public void Update(DalLotImage entity) { var lotImage = entity.ToLotImage(); var existedLotImage = _dbContext.Entry<LotImage>(_dbContext.Set<LotImage>().Find(lotImage.ImageId)); if (existedLotImage == null) { return; } existedLotImage.State = EntityState.Modified; }
public void Create(DalLotImage entity) { var lotImage = entity.ToLotImage(); _dbContext.Set<LotImage>().Add(lotImage); }