/// <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()); } }
/// <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)); }