Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- namespace ClassLibrary3
- {
- public interface IModel { }
- public class ZhopaModel : IModel { }
- public class DbPepository<TModel> : IModelRepository<TModel> where TModel : IModel
- {
- }
- public class RoleRepository<TModel> : IModelRepository<TModel> where TModel : IModel
- {
- }
- public interface IModelRepository<TModel>
- where TModel : IModel
- { }
- public class Class1<T> where T: IModel
- {
- public void LoadSingleModel(IModelRepository<T> repo)
- {
- }
- }
- public class Class2
- {
- private void Kek()
- {
- var lol = new Class1<ZhopaModel>();
- var kek = new DbPepository<ZhopaModel>();
- lol.LoadSingleModel(kek);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement