コード例 #1
0
        public async Task <ActionResult> RemoveScheduledRecipeAsync([FromRoute] int scheduleId)
        {
            var scheduledRecipeToRemove = await _recipesScheduled.GetAsync(scheduleId);

            if (scheduledRecipeToRemove == null)
            {
                return(NotFound());
            }

            _recipesScheduled.RemoveAsync(scheduledRecipeToRemove);
            await _recipesScheduled.SaveAsync();

            return(NoContent());
        }
コード例 #2
0
 public async Task <bool> SaveAsync()
 {
     return(await _dal.SaveAsync());
 }