public ResponseAddWindow AddWindow(RequestAddWindow request) { var imagePath = SaveImageToWorksampleDirectory(request.FileName, request.FileData, CATALOG_DIRECTORY); var item = new WindowPlastic() { Feature = request.Feature, HasSetup = request.HasSetup, ImageUrl = imagePath, Name = request.Name, Size = request.Size, Total = request.Total }; dbManager.AddNewWindowPlastics(item); return(new ResponseAddWindow()); }
public void UpdateWindowPlastic(WindowPlastic item) { repository.WindowPlastics.DbSet.Update(item); repository.SaveChanges(); }
public void AddNewWindowPlastics(WindowPlastic item) { repository.WindowPlastics.DbSet.Add(item); repository.SaveChanges(); }