public void AddPolicy(Policy policy) { using (var claimsContext = new ClaimsContext()) { claimsContext.Policies.Add(policy); claimsContext.SaveChanges(); } }
public List <Claim> GetClaims() { using (var claimsContext = new ClaimsContext()) { var claims = claimsContext.Claims; return(claims.ToList()); } }
public void AddClaim(Claim claim) { using (var claimsContext = new ClaimsContext()) { var claims = claimsContext.Claims; claims.Add(claim); claimsContext.SaveChanges(); } }
public List <Policy> GetPolicies() { using (var claimsContext = new ClaimsContext()) { var policies = claimsContext.Policies; return(policies.ToList()); } }
public void Setup() { _claimsContext = new ClaimsContext(); _claimsContextFactory = new ClaimsContextFactory(); _claimsRepository = new Confie.WesternGeneral.ClaimsRepository.ClaimsRepository(_claimsContextFactory); _updatedUser = Guid.NewGuid().ToString("N"); _updatedDate = DateTime.Parse(DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss")); _minDate = DateTime.Parse(SqlDateTime.MinValue.ToString()); _claim = StubClaim(); _claimsContext.Database.Delete(); }
public ClaimsController(ClaimsContext context, ILogger <ClaimsController> logger) { _context = context; _logger = logger; if (_context.ClaimItems.Count() == 0) { // Create a new ClaimItem if collection is empty, // which means you can't delete all ClaimItems. _context.ClaimItems.Add(createTestClaimData()); _context.SaveChanges(); } }
public Repository() { context = new ClaimsContext(); }
public ClaimsController(IOptions <AppSettings> ASettings, ClaimsContext ADBContext) { this.Settings = ASettings; DBContext = ADBContext; }