ViIvanov

Untitled

Apr 9th, 2013
148
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.28 KB | None | 0 0
  1. class Connection { }
  2. class Command { }
  3.  
  4. class SqlConnection { }
  5. class SqlCommand {
  6.   public SqlCommand(SqlConnection c) { }
  7. }
  8.  
  9. class Repo<TCommand> where TCommand: Command, new(Connection)
  10. {
  11.   public X Execute<X>(Connection c) {
  12.     var command = new TCommand(c);
  13.     …
  14.   }
  15. }
Advertisement
Add Comment
Please, Sign In to add comment