Ejemplo n.º 1
0
        public async Task Delete(Guid id)
        {
            var modelToUpdate = await _context.Products.FirstOrDefaultAsync(s => s.Id == id);

            _context.Remove(modelToUpdate);
            await _context.SaveChangesAsync();
        }
Ejemplo n.º 2
0
        public async Task Delete(PackListModel model)
        {
            var modelToUpdate = await _context.PackLists.FirstOrDefaultAsync(s => s.Id == model.Id);

            _context.Remove(modelToUpdate);
            await _context.SaveChangesAsync();
        }