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); }
private string GetDbPath(TvControlTask task) { return(this.GetDbPath(task.Id)); ; }
public Task UpdateTaskAsync(TvControlTask task) { return(this.client.UpdateAsync(this.GetDbPath(task), Mapper.Map <TvControlTask>(task))); }
public async Task CreateTaskAsync(TvControlTask task) { await this.client.SetAsync(this.GetDbPath(task), task); }