Esempio n. 1
0
 /// <summary>
 /// Method to add label
 /// </summary>
 /// <param name="label"></param>
 /// <returns></returns>
 public async Task <int> AddLabel(Domain.Models.Label label)
 {
     using (var context = new ToDoServiceDBContext())
     {
         context.Labels.Add(label);
         return(await context.SaveChangesAsync());
     }
 }
Esempio n. 2
0
 /// <summary>
 /// Mutation to add label
 /// </summary>
 /// <param name="label"></param>
 /// <returns></returns>
 public async Task <int> AddLabel(Domain.Models.Label label)
 {
     return(await _labelDbService.AddLabel(label));
 }