コード例 #1
0
        public void UpdateClient(TCompany c)

        {
            CompanyEntity clientEntity = AutoMapper.Mapper.Map <CompanyEntity>(c);

            _context.Entry(clientEntity).State = System.Data.Entity.EntityState.Modified;
            _context.SaveChanges();
        }
コード例 #2
0
ファイル: UserStore.cs プロジェクト: gvhung/CMS
        public void ActivateUser(Guid id)
        {
            UserProfileEntity c = (from x in _context.Users
                                   where x.UID == id
                                   select x).First();

            c.Status = 1;
            //dataBase.SaveChanges();
            _context.Entry(c).State = System.Data.Entity.EntityState.Modified;
            _context.SaveChanges();
        }