Esempio n. 1
0
        public async Task UpdateAsync(FixItTask taskToSave)
        {
            Stopwatch timespan = Stopwatch.StartNew();

            try {
                db.Entry(taskToSave).State = EntityState.Modified;
                await db.SaveChangesAsync();

                timespan.Stop();
                log.TraceApi("SQL Database", "FixItTaskRepository.UpdateAsync", timespan.Elapsed, "taskToSave={0}", taskToSave);
            }
            catch (Exception e)
            {
                log.Error(e, "Error in FixItTaskRepository.UpdateAsync(taskToSave={0})", taskToSave);
                throw;
            }
        }
 public Task UpdateAsync(FixItTask taskToSave)
 {
     context.Entry(taskToSave).State = EntityState.Modified;
     return(context.SaveChangesAsync());
 }