Esempio n. 1
0
        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.
        }
Esempio n. 2
0
 public ExceptionsLog(IShareHolderContext ctx)
 {
     _ctx = ctx;
 }
Esempio n. 3
0
 public ShareHolderController(IShareHolderContext context)
 {
     _context = context;
 }
Esempio n. 4
0
 public StatementController(IShareHolderContext repo, StatementService svc)
 {
     _context = repo;
     _svc     = svc;
 }
Esempio n. 5
0
 public VotingCardController(IShareHolderContext context, VotingCardServices vcSvc)
 {
     _context       = context;
     _votingCardSvc = vcSvc;
 }
Esempio n. 6
0
 public VotingByHandServices(IShareHolderContext context)
 {
     _context = context;
 }
Esempio n. 7
0
 public CandidateCommandHandler(IShareHolderContext context)
 {
     _context = context;
 }
Esempio n. 8
0
 public CandidateFileController(IShareHolderContext context)
 {
     _ctx = context;
 }
Esempio n. 9
0
 public ShareHolderService(IShareHolderContext context)
 {
     _context = context;
 }
Esempio n. 10
0
 public ShareHolderDSController(IShareHolderContext repo, ShareHodlerValidator val)
 {
     _context = repo;
     _shareHolderValidator = val;
 }
Esempio n. 11
0
 public UoWvotingCard(IShareHolderContext context)
 {
     this.context = context;
 }
Esempio n. 12
0
 public StatementService(IShareHolderContext context)
 {
     _context = context;
 }
Esempio n. 13
0
 public CandidateQueryHandler(IShareHolderContext context)
 {
     _context = context;
 }
Esempio n. 14
0
 public ShareHodlerValidator(IShareHolderContext repo)
 {
     _shareHolderRepo = repo; // new ShareHolderRepo(ShareHolderContext context);
 }
Esempio n. 15
0
 // If you are using Dependency Injection, you can delete the following constructor
 public VotingByHandController(IShareHolderContext shRepo, VotingByHandServices svc)
 {
     _context         = shRepo;
     _votingByHandSvc = svc;
 }
Esempio n. 16
0
 public CandidateController(IShareHolderContext context)
 {
     _context = context;
 }