예제 #1
0
 public async Task <Taskie> UpdateTaskie(Taskie taskie)
 {
     taskie.dtModified = DateTime.Now;
     using (_context = ContextFactory.GetContext())
     {
         _context.Update(taskie);
         await _context.SaveChangesAsync();
     }
     return(taskie);
 }
예제 #2
0
        public async Task <Taskie> AddTaskieAsync(Taskie taskie)
        {
            taskie.dtModified = DateTime.Now;
            using (_context = ContextFactory.GetContext())
            {
                await _context.Taskies.AddAsync(taskie);

                await _context.SaveChangesAsync();
            }
            return(taskie);
        }