Ejemplo n.º 1
0
 public async Task UpdateAsync(TaskBlock taskBlock)
 {
     using (_context = ContextFactory.GetContext())
     {
         _context.Update(taskBlock);
         await _context.SaveChangesAsync();
     }
 }
Ejemplo n.º 2
0
        public async Task <TaskBlock> AddAsync(TaskBlock taskBlock)
        {
            using (_context = ContextFactory.GetContext())
            {
                taskBlock.dtModified = DateTime.Now;
                await _context.TaskBlocks.AddAsync(taskBlock);

                await _context.SaveChangesAsync();

                return(taskBlock);
            }
        }