Esempio n. 1
0
 public void Dispose()
 {
     if (null != _emrContext)
     {
         _emrContext.SaveChanges();
         _emrContext.Dispose();
     }
 }
        public void SetUp()
        {
            _context          = new EMRContext(_options);
            _configRepository = new ConfigRepository(_context);

            _testUser     = new User("MauntestMaun");
            _testGroup    = new Group("MaungroupMaun");
            _testGroupNew = new Group("MaungroupMaunNEW");
            _featureIds   = _context.Features.Where(x => x.DeleteFlag == 0).Take(2).Select(x => x.FeatureID).ToList();
            _userIds      = _context.Users.Where(x => x.DeleteFlag == 0).Select(x => x.UserId).ToList();
            _context.Add(_testUser);
            _context.Add(_testGroup);
            _context.SaveChanges();
        }
Esempio n. 3
0
 public void Create(CrmPerson item)
 {
     db.CrmPersons.Add(item);
     db.SaveChanges();
 }