Example #1
0
 public List <Contract> GetContractsBy(Provider provider, Buyer buyer)
 {
     using (var dbContext = new ContractsDbContext())
     {
         return(dbContext.Contracts.Where(c => c.Provider == provider && c.Buyer == buyer).ToList());
     }
 }
Example #2
0
 public List <Contract> GetAllContracts()
 {
     using (var dbContext = new ContractsDbContext())
     {
         return(dbContext.Contracts
                .Include(c => c.Provider)
                .Include(c => c.Buyer)
                .ToList());
     }
 }
Example #3
0
 public ContractsController(ContractsDbContext context)
 {
     _context = context;
 }
 public ContractsController(ContractsDbContext db, ContractRepository repo)
 {
     _db   = db;
     _repo = repo;
 }
 public BillObjectAddedEventHandler(ContractsDbContext db)
 {
     _db = db;
 }
 public ContractsDataController(ContractsDbContext db, ContractRepository contractRepo)
 {
     _db           = db;
     _contractRepo = contractRepo;
 }
Example #7
0
 public FakeEntityController(ContractsDbContext db)
 {
     _db = db;
 }
 public BillObjectController(ContractsDbContext db, ContractRepository repo)
 {
     _db   = db;
     _repo = repo;
 }