Example #1
0
 public MedSimDtoRepository(IPrincipal user, MedSimDbContext validationContext = null)
 {
     _contextProvider  = new EFContextProvider <MedSimDbContext>(/*user , allowedRoles: new[] { RoleConstants.AccessAllData } */);
     _currentUser      = new CurrentPrincipal(user, validationContext);
     _validationHelper = new ValidateMedSim(_currentUser);
     _contextProvider.BeforeSaveEntitiesDelegate += BeforeSaveEntities;
     _contextProvider.AfterSaveEntitiesDelegate  += _validationHelper.AfterSave;
     _user = user;
 }
Example #2
0
        public MedSimDtoRepository(IPrincipal user, MedSimDbContext validationContext = null)
        {

            _contextProvider = new EFContextProvider<MedSimDbContext>(/*user , allowedRoles: new[] { RoleConstants.AccessAllData } */);
            _currentUser = new CurrentPrincipal(user, validationContext);
            _validationHelper = new ValidateMedSim(_currentUser);
            _contextProvider.BeforeSaveEntitiesDelegate += BeforeSaveEntities; 
            _contextProvider.AfterSaveEntitiesDelegate += _validationHelper.AfterSave;
            _user = user;
        }