public void UpdateClient(TCompany c) { CompanyEntity clientEntity = AutoMapper.Mapper.Map <CompanyEntity>(c); _context.Entry(clientEntity).State = System.Data.Entity.EntityState.Modified; _context.SaveChanges(); }
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(); }