예제 #1
0
 public static void Seed(APSContext dbContext)
 {
     //Seed your Domain entities object here
     #region Lookup & lookupValues
     dbContext.LookupType.Add(new LookupType()
     {
         Id        = 1,
         CreatedBy = "Dnyaneshwar",
         Type      = "Country",
         CreatedOn = DateTime.UtcNow,
         UniqueId  = new Guid("F3BB9C87-8DA1-43E1-BB70-D2830B2AD8DD")
     });
     dbContext.LookupValues.Add(new LookupValues()
     {
         Id           = 1,
         CreatedBy    = "Dnyaneshwar",
         LookUpTypeId = 1,
         Value        = "India",
         CreatedOn    = DateTime.UtcNow,
         UniqueId     = new Guid("A5AE6EB6-F291-4A6F-B3BB-EE830D22314F")
     });
     #endregion
     dbContext.SaveChanges();
 }
예제 #2
0
 public GenericRepository(APSContext dbContext)
 {
     _dbContext = dbContext;
     _entities  = dbContext.Set <TEntity>();
     //_dbContext.CurrentUserId = httpAccessor?.HttpContext?.User?.Claims?.SingleOrDefault(c => c.Type == "id")?.Value;
 }
예제 #3
0
 public MasterRepository(APSContext apsContext)
 {
     this._apsContext = apsContext;
 }