Advertisement
Guest User

Untitled

a guest
Mar 28th, 2017
120
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.78 KB | None | 0 0
  1. using System;
  2.  
  3. namespace ClassLibrary3
  4. {
  5.     public interface IModel { }
  6.     public class ZhopaModel : IModel { }
  7.     public class DbPepository<TModel> : IModelRepository<TModel> where TModel : IModel
  8.     {
  9.     }
  10.     public class RoleRepository<TModel> : IModelRepository<TModel> where TModel : IModel
  11.     {
  12.     }
  13.     public interface IModelRepository<TModel>
  14.         where TModel : IModel
  15.     { }
  16.    
  17.     public class Class1<T> where T: IModel
  18.     {
  19.         public void LoadSingleModel(IModelRepository<T> repo)
  20.         {
  21.         }
  22.     }
  23.  
  24.     public class Class2
  25.     {
  26.         private void Kek()
  27.         {
  28.             var lol = new Class1<ZhopaModel>();
  29.             var kek = new DbPepository<ZhopaModel>();
  30.             lol.LoadSingleModel(kek);
  31.         }
  32.     }
  33. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement