Exemple #1
0
        public async Task <T> Remove(T Item)
        {
            await Task.FromResult(_dbContext.Remove <T>(Item));

            await _dbContext.SaveChangesAsync();

            return(Item);
        }
Exemple #2
0
        private void RemoveExistingCheckouts(int deviceId)
        {
            var checkout = _context.Checkouts.FirstOrDefault(ch => ch.Device.Id == deviceId);

            if (checkout != null)
            {
                _context.Remove(checkout);
            }
        }