Exemplo n.º 1
0
        internal void InitContext()
        {
            var builder = new DbContextOptionsBuilder <FeedBackManagementSystemContext>()
                          .UseInMemoryDatabase(Guid.NewGuid().ToString());

            var context   = new FeedBackManagementSystemContext(builder.Options);
            var eventInfo = Enumerable.Range(1, 1)
                            .Select(i => new TblEventEnrollmentDetails
            {
                EmployeeId = 273690,
                Id         = 1,
                EventId    = "EVNT00047261",
                EventName  = "Bags of Joy Distribution"
            });

            var login = Enumerable.Range(1, 1)
                        .Select(i => new TblLogin
            {
                UserId = "273690",
                RoleId = 1,
                Id     = 1
            });

            context.TblLogin.AddRange(login);
            var changedTblLogin = context.SaveChanges();

            context.TblEventEnrollmentDetails.AddRange(eventInfo);
            var changed = context.SaveChanges();

            _context = context;
        }
Exemplo n.º 2
0
 public FeedbackRepo(FeedBackManagementSystemContext context)
 {
     _context = context;
 }
Exemplo n.º 3
0
 public EventDetailRepository(FeedBackManagementSystemContext context)
 {
     _context = context;
 }
 public TblEventEnrollmentDetailsController(FeedBackManagementSystemContext context)
 {
     _context = context;
 }
Exemplo n.º 5
0
 public AuthorizationRepo(FeedBackManagementSystemContext context)
 {
     _context = context;
 }
Exemplo n.º 6
0
 public SettingsRepo(FeedBackManagementSystemContext context)
 {
     _context = context;
 }