Example #1
0
        public async Task <IActionResult> PutExport(int id, Export export)
        {
            if (id != export.dataID)
            {
                return(BadRequest());
            }

            _context.Entry(export).State = EntityState.Modified;

            try
            {
                await _context.SaveChangesAsync();
            }
            catch (DbUpdateConcurrencyException)
            {
                if (!ExportExists(id))
                {
                    return(NotFound());
                }
                else
                {
                    throw;
                }
            }

            return(NoContent());
        }
 public virtual async Task Update(T entity)
 {
     _dbSet.Attach(entity);
     _context.Entry(entity).State = EntityState.Modified;
     await Task.CompletedTask;
 }