public ImagesM Save(ImagesM image) { Image imgDb = new Image() { ImageBinary = image.ImageBinary, MobileId = image.MobileId, }; imgDb = Context.Images.Add(imgDb); Context.SaveChanges(); image.Id = imgDb.Id; return(image); }
public ImagesM Edit(ImagesM image) { var found = Context.Images.SingleOrDefault(x => x.Id == image.Id); if (found == null) { return(null); } found.MobileId = image.MobileId; found.ImageBinary = image.ImageBinary; Context.SaveChanges(); return(image); }
public ImagesM Save(ImagesM image) { return(imageRepository.Save(image)); }
public ImagesM Edit(ImagesM image) { return(imageRepository.Edit(image)); }