public void BlobDeleteFile(ProductBlobFileChangeModel model) { var blob = Db.ProductBlob.FirstOrDefault(c => c.ProductId == model.ProductId && c.BlobFileName.ToLower() == model.BlobFileName.ToLower()); Db.ProductBlob.Remove(blob); Db.SaveChanges(); }
public void BlobAddFile(ProductBlobFileChangeModel model) { var blob = _mapper.Map <ProductBlob>(model); Db.ProductBlob.Add(blob); Db.SaveChanges(); }