Ejemplo n.º 1
0
        public async Task <ActionResult <ProductBook> > DeleteProductBook(string id)
        {
            var productBook = await _context.ProductBooks.FindAsync(id);

            ChangeLog.AddDeletedLog(_context, "Books", productBook);

            if (productBook == null)
            {
                return(NotFound());
            }
            _context.ProductBooks.Remove(productBook);
            await _context.SaveChangesAsync();

            return(productBook);
        }
Ejemplo n.º 2
0
        public async Task <ActionResult <User> > DeleteUser(Guid id)
        {
            var user = await _context.Users.FindAsync(id);

            ChangeLog.AddDeletedLog(_context, "Users", user);

            if (user == null)
            {
                return(NotFound());
            }

            _context.Users.Remove(user);
            await _context.SaveChangesAsync();

            return(user);
        }
Ejemplo n.º 3
0
        public async Task <ActionResult <TableConsecutive> > DeleteTableConsecutive(Guid id)
        {
            var tableConsecutive = await _context.TableConsecutives.FindAsync(id);

            ChangeLog.AddDeletedLog(_context, "TableConsecutives", tableConsecutive);

            if (tableConsecutive == null)
            {
                return(NotFound());
            }

            _context.TableConsecutives.Remove(tableConsecutive);
            await _context.SaveChangesAsync();

            return(tableConsecutive);
        }
Ejemplo n.º 4
0
        public async Task <ActionResult <ProductBookSubject> > DeleteProductBookSubject(Guid id)
        {
            var productBookSubject = await _context.ProductBookSubjects.FindAsync(id);

            ChangeLog.AddDeletedLog(_context, "BookSubjects", productBookSubject);

            if (productBookSubject == null)
            {
                return(NotFound());
            }

            _context.ProductBookSubjects.Remove(productBookSubject);
            await _context.SaveChangesAsync();

            return(productBookSubject);
        }
Ejemplo n.º 5
0
        public async Task <ActionResult <ProductSongGenre> > DeleteProductSongGenre(Guid id)
        {
            var productSongGenre = await _context.ProductSongGenres.FindAsync(id);

            ChangeLog.AddDeletedLog(_context, "SongGenres", productSongGenre);

            if (productSongGenre == null)
            {
                return(NotFound());
            }

            _context.ProductSongGenres.Remove(productSongGenre);
            await _context.SaveChangesAsync();

            return(productSongGenre);
        }
Ejemplo n.º 6
0
        public async Task <ActionResult <ProductMovieActor> > DeleteProductMovieActor(Guid id)
        {
            var productMovieActor = await _context.ProductMovieActors.FindAsync(id);

            ChangeLog.AddDeletedLog(_context, "MovieActors", productMovieActor);

            if (productMovieActor == null)
            {
                return(NotFound());
            }

            _context.ProductMovieActors.Remove(productMovieActor);
            await _context.SaveChangesAsync();

            return(productMovieActor);
        }
Ejemplo n.º 7
0
        public async Task <ActionResult <SystemConfiguration> > DeleteSystemConfiguration(Guid id)
        {
            var systemConfiguration = await _context.SystemConfigurations.FindAsync(id);

            ChangeLog.AddDeletedLog(_context, "SystemConfigurations", systemConfiguration);

            if (systemConfiguration == null)
            {
                return(NotFound());
            }

            _context.SystemConfigurations.Remove(systemConfiguration);
            await _context.SaveChangesAsync();

            return(systemConfiguration);
        }