public void Create(TEntity item) { using (AuctionContext db = new AuctionContext()) { BDSet.Add(item); } }
public UnitOfWork(AuctionContext bD, ContextRepository <Lot> lots, ContextRepository <Role> roles, ContextRepository <User> users) { BD = bD; Lots = lots; Roles = roles; Users = users; }
public ContextRepository(AuctionContext context) { Context = context; BDSet = context.Set <TEntity>(); }