public void UpdateGDInformationStatusById(int id, int statusId) { var gD = _context.GDInformation.Where(x => x.Id == id).FirstOrDefault(); gD.statusId = statusId; _context.Entry(gD).State = EntityState.Modified; _context.SaveChanges(); }
/// <summary> /// 增加一条记录 /// </summary> /// <param name="entity"></param> public void Instert(TEntity entity) { Table.Add(entity); _dbContext.SaveChanges(); }