예제 #1
0
        public async Task <Guid> SaveAsync(RecipeDetailModel data, string culture)
        {
            if (data.Id == Guid.Empty)
            {
                return(await recipeClient.RecipePostAsync(apiVersion, culture, data));
            }
            else
            {
                var recipePutAsync = await recipeClient.RecipePutAsync(apiVersion, culture, data);

                return(recipePutAsync ?? Guid.Empty);
            }
        }
예제 #2
0
 public async Task <Guid?> SaveAsync(RecipeDetailModel recipe)
 {
     return(recipe.Id == Guid.Empty
         ? await recipeClient.RecipePostAsync(apiVersion, culture, recipe)
         : await recipeClient.RecipePutAsync(apiVersion, culture, recipe));
 }
예제 #3
0
 public async Task <Guid> InsertAsync(RecipeDetailModel recipeNewModel, string version = null, string culture = null)
 {
     version ??= apiOptions.Value.Version;
     culture ??= webOptions.Value.DefaultCulture;
     return(await _recipeClient.RecipePostAsync(version, culture, recipeNewModel));
 }
예제 #4
0
 public async Task <Guid> InsertAsync(RecipeNewModel recipeNewModel)
 {
     return(await _recipeClient.RecipePostAsync("3", "cs", recipeNewModel));
 }