コード例 #1
0
 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;
 }
コード例 #2
0
 public void Create(DalLotImage entity)
 {
     var lotImage = entity.ToLotImage();
     _dbContext.Set<LotImage>().Add(lotImage);
 }