protected void CreateDbContext() { context = new ShareHolderContext(); //Need reviewing: Do NOT enable proxied entities, else serialization fails //if false it will not get the associated certification and skills when we get the applicants context.Configuration.ProxyCreationEnabled = false; //Need reviewing: Load navigation properties explicitly (avoid serialization trouble) context.Configuration.LazyLoadingEnabled = false; //Need reviewing: Because Web API will perform validation, we don't need/want EF to do so //context.Configuration.ValidateOnSaveEnabled = false; //Need reviewing: DbContext.Configuration.AutoDetectChangesEnabled = false; // We won't use this performance tweak because we don't need // the extra performance and, when autodetect is false, // we'd have to be careful. We're not being that careful. }
public ExceptionsLog(IShareHolderContext ctx) { _ctx = ctx; }
public ShareHolderController(IShareHolderContext context) { _context = context; }
public StatementController(IShareHolderContext repo, StatementService svc) { _context = repo; _svc = svc; }
public VotingCardController(IShareHolderContext context, VotingCardServices vcSvc) { _context = context; _votingCardSvc = vcSvc; }
public VotingByHandServices(IShareHolderContext context) { _context = context; }
public CandidateCommandHandler(IShareHolderContext context) { _context = context; }
public CandidateFileController(IShareHolderContext context) { _ctx = context; }
public ShareHolderService(IShareHolderContext context) { _context = context; }
public ShareHolderDSController(IShareHolderContext repo, ShareHodlerValidator val) { _context = repo; _shareHolderValidator = val; }
public UoWvotingCard(IShareHolderContext context) { this.context = context; }
public StatementService(IShareHolderContext context) { _context = context; }
public CandidateQueryHandler(IShareHolderContext context) { _context = context; }
public ShareHodlerValidator(IShareHolderContext repo) { _shareHolderRepo = repo; // new ShareHolderRepo(ShareHolderContext context); }
// If you are using Dependency Injection, you can delete the following constructor public VotingByHandController(IShareHolderContext shRepo, VotingByHandServices svc) { _context = shRepo; _votingByHandSvc = svc; }
public CandidateController(IShareHolderContext context) { _context = context; }