static void Main(string[] args) { IMyRepository repo = new MyRepository(); IMyRepository proxyRepo = PolicyInjection.Wrap<IMyRepository>(repo); var allProducts = proxyRepo.GetAllProducts(); foreach (var product in allProducts) { Console.WriteLine("Product: {0}", product.Name); } Console.WriteLine(); var nexus4 = proxyRepo.GetProduct(3); Console.WriteLine("Product with Id=3: is {0}", nexus4.Name); Console.WriteLine("Press any key to continue..."); Console.ReadKey(); }
public AccountController() { _dbContext=new MyIdentityDbContext(); _repository=new MyRepository<MyIdentityDbContext, MyUser, long>(_dbContext); }
public MyUserStore(MyRepository <MyIdentityDbContext, MyUser, long> userRepository) { _useRepository = userRepository; }
public MyMessageHandler(MyRepository repository, Context context) { this.context = context; this.repository = repository; }
// GET: Order/Details/5 public ActionResult Details(int id) { MyRepository repository = new MyRepository(); return(View(repository.GetOrder(id))); }
// GET: Order public ActionResult Index() { MyRepository repository = new MyRepository(); return(View(repository.GetOrders())); }
public Envio_FinalizadoModel(MyRepository <Paquete> repository) { _repository = repository; }
public EditModel(MyRepository <Producto> repository, INotyfService notifyService, MyRepository <Negocio> negocioRepository, IAppLogger <EditModel> logger) { _repository = repository; _notifyService = notifyService; _negocioRepository = negocioRepository; _logger = logger; }
public EditModel(MyRepository <ApplicationCore.Entities.Cliente> repository, INotyfService notyfService) { _repository = repository; _notyfService = notyfService; }