public async Task <IActionResult> Put(int id, [FromBody] UpdateRecipeIngredientCommand command)
        {
            command.Id = id;
            var result = await _service.UpdateAsync(command);

            return(Ok(result));
        }
        public virtual async Task <NotificationResult> UpdateAsync(UpdateRecipeIngredientCommand command)
        {
            BeginTransaction();
            var result = await _handler.UpdateAsync(command);

            return(Commit(result));
        }
        public virtual async Task <NotificationResult> UpdateAsync(UpdateRecipeIngredientCommand command)
        {
            var result = new NotificationResult();
            var item   = new RecipeIngredientInfo(command);

            result.Add(item.GetNotificationResult());
            if (!result.IsValid)
            {
                return(result);
            }
            result.Add(await _recipeIngredientRepository.UpdateAsync(item));
            if (result.IsValid)
            {
                result.Data = item.Id;
                result.AddMessage(Shared.Domain.Resources.Handler.UpdateSuccess_Message);
            }
            else
            {
                result.AddErrorOnTop(Shared.Domain.Resources.Handler.UpdateError_Message);
            }

            return(result);
        }
 public RecipeIngredientInfo(UpdateRecipeIngredientCommand command)
 {
     Map(command);
     this.InsertOrUpdateScopeValidate();
 }