public BaseService(IOrganizationService orgService, ITracingService tracingservice) { OrgService = orgService; TracingService = tracingservice; //Create OrganizationService Context OrgServiceContext = new CCMSContext(OrgService); }
private void InitDbContext(CCMSContext context) { Configuration = new ConfigurationBuilder().AddJsonFile("mock.json").Build(); context.CcmsStfcLisalesEmpDetails.Add(new CcmsStfcLisalesEmpDetails { EmployeeName = "Mani", MobileNumber = "8807542027", EmailID = "*****@*****.**" }); context.SaveChanges(); }
private void InitContext() { var builder = new DbContextOptionsBuilder <CCMSContext>().UseInMemoryDatabase(); CCMSContext context = new CCMSContext(builder.Options); context.Database.EnsureCreated(); context.Database.EnsureDeleted(); InitDbContext(context); context.SaveChanges(); CCMSContext = context; }
public BaseService(IOrganizationService orgService, IOrganizationService elevatedService, ITracingService tracingservice) : this(orgService, tracingservice) { ElevatedService = elevatedService; ElevatedServiceContext = new CCMSContext(ElevatedService); }
public StliDataRepository(CCMSContext ccmsContext, IConfiguration configuration) { this.ccmsContext = ccmsContext; this.configuration = configuration; }
public LIDataRepository(CCMSContext ccmsContext) { this.ccmsContext = ccmsContext; }