Пример #1
0
        public bool UpdateImage(DAV.Domain.Entities.Image image)
        {
            _context.Attach(image).State = Microsoft.EntityFrameworkCore.EntityState.Modified;
            _context.Update(image);

            _context.SaveChanges();
            return(true);
        }
Пример #2
0
        public DAV.Domain.Entities.Image AddImage(DAV.Domain.Entities.Image image)
        {
            image.name = "";

            _context.Add(image);
            _context.SaveChanges();

            return(image);
        }
Пример #3
0
 public void DeleteImage(DAV.Domain.Entities.Image image)
 {
     _context.Attach(image).State = Microsoft.EntityFrameworkCore.EntityState.Deleted;
 }