public async Task UpdateTaskAsync(TvControlTask task)
 {
     using (var context = new TvControlContext())
     {
         context.Entry(Mapper.Map <TvControlTaskDbo>(task)).State = EntityState.Modified;
         await context.SaveChangesAsync().ConfigureAwait(false);
     }
     await this.tasksServiceImplementation.UpdateTaskAsync(task).ConfigureAwait(false);
 }
 public async Task CreateTaskAsync(TvControlTask task)
 {
     using (var context = new TvControlContext())
     {
         if (string.IsNullOrWhiteSpace(task.Id))
         {
             task.Id = Guid.NewGuid().ToString("N");
         }
         context.Tasks.Add(Mapper.Map <TvControlTaskDbo>(task));
         await context.SaveChangesAsync().ConfigureAwait(false);
     }
     await this.tasksServiceImplementation.CreateTaskAsync(task);
 }
Ejemplo n.º 3
0
        private string GetDbPath(TvControlTask task)
        {
            return(this.GetDbPath(task.Id));

            ;
        }
Ejemplo n.º 4
0
 public Task UpdateTaskAsync(TvControlTask task)
 {
     return(this.client.UpdateAsync(this.GetDbPath(task), Mapper.Map <TvControlTask>(task)));
 }
Ejemplo n.º 5
0
 public async Task CreateTaskAsync(TvControlTask task)
 {
     await this.client.SetAsync(this.GetDbPath(task), task);
 }