Пример #1
0
        public Task <int> Update(long id, UpdateSmallBoxEntryReq entity)
        {
            var entry = db.Find(id);

            entry.Amount     = entity.Amount;
            entry.Concept    = entity.Concept;
            entry.Date       = entity.getDate();
            entry.Type       = entity.Type;
            entry.ClientId   = entity.ClientId;
            entry.ProviderId = entity.ProviderId;
            db.Update(entry);
            return(context.SaveChangesAsync());
        }
Пример #2
0
        public async Task <IActionResult> Update(long id, [FromBody] UpdateSmallBoxEntryReq req)
        {
            var result = await smallboxRepo.Update(id, req);

            return(Ok(result));
        }