Пример #1
0
        public async Task <CardUpdateResultEnum> UpdateAsync(Card card)
        {
            _context.Entry(card).State = EntityState.Modified;

            return(await _context.SaveChangesAsync() > 0
                         ? CardUpdateResultEnum.Successful
                         : CardUpdateResultEnum.DBUpdateFailed);
        }
Пример #2
0
        public async Task <int> UpdateAsync(Visitor visitor)
        {
            _context.Entry(visitor).State = EntityState.Modified;

            return(await _context.SaveChangesAsync());
        }