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); } }
public async Task <Guid?> SaveAsync(RecipeDetailModel recipe) { return(recipe.Id == Guid.Empty ? await recipeClient.RecipePostAsync(apiVersion, culture, recipe) : await recipeClient.RecipePutAsync(apiVersion, culture, recipe)); }
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)); }
public async Task <Guid> InsertAsync(RecipeNewModel recipeNewModel) { return(await _recipeClient.RecipePostAsync("3", "cs", recipeNewModel)); }