Delete unnecessary files
This commit is contained in:
@@ -1,6 +0,0 @@
|
||||
namespace Francesco.Recipes.World.Controllers.Favorit
|
||||
{
|
||||
public class FavoritController
|
||||
{
|
||||
}
|
||||
}
|
||||
@@ -1,32 +0,0 @@
|
||||
namespace Francesco.Recipes.World.Controllers
|
||||
{
|
||||
using System.Diagnostics;
|
||||
using Francesco.Recipes.World.Models;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
|
||||
public class HomeController : Controller
|
||||
{
|
||||
private readonly ILogger<HomeController> _logger;
|
||||
|
||||
public HomeController(ILogger<HomeController> logger)
|
||||
{
|
||||
_logger = logger;
|
||||
}
|
||||
|
||||
public IActionResult Index()
|
||||
{
|
||||
return View();
|
||||
}
|
||||
|
||||
public IActionResult Privacy()
|
||||
{
|
||||
return View();
|
||||
}
|
||||
|
||||
[ResponseCache(Duration = 0, Location = ResponseCacheLocation.None, NoStore = true)]
|
||||
public IActionResult Error()
|
||||
{
|
||||
return View(new ErrorViewModel { RequestId = Activity.Current?.Id ?? HttpContext.TraceIdentifier });
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,6 +0,0 @@
|
||||
namespace Francesco.Recipes.World.Controllers.Ingredient
|
||||
{
|
||||
public class IngredientController
|
||||
{
|
||||
}
|
||||
}
|
||||
@@ -1,6 +0,0 @@
|
||||
namespace Francesco.Recipes.World.Controllers.Instruction
|
||||
{
|
||||
public class InstructionController
|
||||
{
|
||||
}
|
||||
}
|
||||
@@ -1,9 +0,0 @@
|
||||
namespace Francesco.Recipes.World.Controllers.MediaFile
|
||||
{
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
|
||||
public class MediaFilesController : Controller
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
@@ -1,6 +0,0 @@
|
||||
namespace Francesco.Recipes.World.Controllers.Recipe
|
||||
{
|
||||
public class RecipeController
|
||||
{
|
||||
}
|
||||
}
|
||||
@@ -1,6 +0,0 @@
|
||||
namespace Francesco.Recipes.World.Controllers.ShoppingList
|
||||
{
|
||||
public class ShoppingLIstController
|
||||
{
|
||||
}
|
||||
}
|
||||
@@ -1,6 +0,0 @@
|
||||
namespace Francesco.Recipes.World.Data.Repository.Category
|
||||
{
|
||||
public class CategoryRepository
|
||||
{
|
||||
}
|
||||
}
|
||||
@@ -1,6 +0,0 @@
|
||||
namespace Francesco.Recipes.World.Data.Repository.Category
|
||||
{
|
||||
public interface ICategoryRepository
|
||||
{
|
||||
}
|
||||
}
|
||||
@@ -1,9 +0,0 @@
|
||||
namespace Francesco.Recipes.World.Data.Repository
|
||||
{
|
||||
public class ErrorViewModel
|
||||
{
|
||||
public string? RequestId { get; set; }
|
||||
|
||||
public bool ShowRequestId => !string.IsNullOrEmpty(RequestId);
|
||||
}
|
||||
}
|
||||
@@ -1,6 +0,0 @@
|
||||
namespace Francesco.Recipes.World.Data.Repository.Favorit
|
||||
{
|
||||
public class FavoritRepository
|
||||
{
|
||||
}
|
||||
}
|
||||
@@ -1,6 +0,0 @@
|
||||
namespace Francesco.Recipes.World.Data.Repository.Favorit
|
||||
{
|
||||
public interface IFavoritRepository
|
||||
{
|
||||
}
|
||||
}
|
||||
@@ -1,17 +0,0 @@
|
||||
namespace FrancescoRecipesWorld.Repositories
|
||||
{
|
||||
using Francesco.Recipes.World.Models.BackendModels.Ingredient;
|
||||
using Francesco.Recipes.World.Models.BackendModels.Recipe;
|
||||
|
||||
public interface IIngredientRepository
|
||||
{
|
||||
Task<Ingredient> CreateIngredientToRecipeAsync(int recipeId, string ingredientName);
|
||||
Task UpdateIngredientAsync(Ingredient ingredient);
|
||||
Task<List<Ingredient>> GetIngredientsByRecipeIdAsync(Guid recipeId);
|
||||
Task<List<Recipe>> GetRecipesByIngredientIdAsync(Guid ingredientId);
|
||||
Task<List<Ingredient>> GetIngredientsByNameAsync(string name);
|
||||
Task RemoveIngredientFromRecipeAsync(Recipe recipe, Guid ingredientId);
|
||||
Task<Ingredient> GetIngredientByIdAsync(Guid ingredientId);
|
||||
|
||||
}
|
||||
}
|
||||
@@ -1,66 +0,0 @@
|
||||
namespace FrancescoRecipesWorld.Repositories
|
||||
{
|
||||
using Francesco.Recipes.World.Data;
|
||||
using Francesco.Recipes.World.Models.BackendModels.Ingredient;
|
||||
using Francesco.Recipes.World.Models.BackendModels.Recipe;
|
||||
|
||||
public class IngredientRepository : IIngredientRepository
|
||||
{
|
||||
private readonly FrancescosRecipesWorldDbContext _context;
|
||||
private readonly RecipeRepository _recipeRepository;
|
||||
public IngredientRepository(
|
||||
FrancescosRecipesWorldDbContext context, RecipeRepository recipeRepository)
|
||||
{
|
||||
_context = context;
|
||||
_recipeRepository = recipeRepository;
|
||||
}
|
||||
|
||||
public async Task<Ingredient> CreateIngredientToRecipeAsync(int recipeId, string ingredientName)
|
||||
{
|
||||
var recipe = await _context.Recipes.FindAsync(recipeId);
|
||||
if (recipe == null)
|
||||
{
|
||||
throw new ArgumentException("Recipe not found", nameof(recipeId));
|
||||
}
|
||||
|
||||
var newIngredient = new Ingredient
|
||||
{
|
||||
Name = ingredientName,
|
||||
};
|
||||
_context.Ingredients.Add(newIngredient);
|
||||
await _context.SaveChangesAsync();
|
||||
return newIngredient;
|
||||
}
|
||||
|
||||
public Task RemoveIngredientFromRecipeAsync(Recipe recipe, Guid ingredientId)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public Task<List<Ingredient>> GetIngredientsByNameAsync(string name)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public Task<List<Ingredient>> GetIngredientsByRecipeIdAsync(Guid recipeId)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public Task<List<Recipe>> GetRecipesByIngredientIdAsync(Guid ingredientId)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public Task UpdateIngredientAsync(Ingredient ingredient)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public async Task<Ingredient> GetIngredientByIdAsync(Guid ingredientId)
|
||||
{
|
||||
var ingredient = await _context.Ingredients.FindAsync(ingredientId);
|
||||
return ingredient ?? throw new InvalidDataException($"Address {ingredientId} not found.");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,6 +0,0 @@
|
||||
namespace Francesco.Recipes.World.Data.Repository.Instruction
|
||||
{
|
||||
public interface IInstructionsRepository
|
||||
{
|
||||
}
|
||||
}
|
||||
@@ -1,6 +0,0 @@
|
||||
namespace Francesco.Recipes.World.Data.Repository.Instruction
|
||||
{
|
||||
public class InstructionsRepository
|
||||
{
|
||||
}
|
||||
}
|
||||
@@ -1,6 +0,0 @@
|
||||
namespace Francesco.Recipes.World.Data.Repository.MediaFile
|
||||
{
|
||||
public interface IMEdiaFileRepository
|
||||
{
|
||||
}
|
||||
}
|
||||
@@ -1,6 +0,0 @@
|
||||
namespace Francesco.Recipes.World.Data.Repository.MediaFile
|
||||
{
|
||||
public class MediaFileRepository
|
||||
{
|
||||
}
|
||||
}
|
||||
@@ -1,6 +0,0 @@
|
||||
namespace Francesco.Recipes.World.Data.Repository.Recipe
|
||||
{
|
||||
public interface IRecipeRepository
|
||||
{
|
||||
}
|
||||
}
|
||||
@@ -1,6 +0,0 @@
|
||||
namespace Francesco.Recipes.World.Data.Repository.Recipe
|
||||
{
|
||||
public class RecipeRepository
|
||||
{
|
||||
}
|
||||
}
|
||||
@@ -1,6 +0,0 @@
|
||||
namespace Francesco.Recipes.World.Data.Repository.ShoppingLIst
|
||||
{
|
||||
public interface IShoppingListRepository
|
||||
{
|
||||
}
|
||||
}
|
||||
@@ -1,6 +0,0 @@
|
||||
namespace Francesco.Recipes.World.Data.Repository.ShoppingLIst
|
||||
{
|
||||
public class ShoppingListRepository
|
||||
{
|
||||
}
|
||||
}
|
||||
@@ -1,6 +0,0 @@
|
||||
namespace Francesco.Recipes.World.Data.Repository.Unit
|
||||
{
|
||||
public interface IUnitRepository
|
||||
{
|
||||
}
|
||||
}
|
||||
@@ -1,6 +0,0 @@
|
||||
namespace Francesco.Recipes.World.Data.Repository.Unit
|
||||
{
|
||||
public class UnitRepository
|
||||
{
|
||||
}
|
||||
}
|
||||
@@ -25,7 +25,6 @@
|
||||
<PrivateAssets>all</PrivateAssets>
|
||||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
||||
</PackageReference>
|
||||
<PackageReference Include="Microsoft.VisualStudio.Web.CodeGeneration.Design" Version="8.0.7" />
|
||||
<PackageReference Include="SecurityCodeScan.VS2019" Version="5.6.7">
|
||||
<PrivateAssets>all</PrivateAssets>
|
||||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
||||
@@ -39,8 +38,4 @@
|
||||
</PackageReference>
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Folder Include="Migrations\" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
|
||||
@@ -1,6 +0,0 @@
|
||||
namespace Francesco.Recipes.World.Data.Repository.Category
|
||||
{
|
||||
public class CategoryService
|
||||
{
|
||||
}
|
||||
}
|
||||
@@ -1,6 +0,0 @@
|
||||
namespace Francesco.Recipes.World.Data.Repository.Favorit
|
||||
{
|
||||
public class FavoritService
|
||||
{
|
||||
}
|
||||
}
|
||||
@@ -1,6 +0,0 @@
|
||||
namespace Francesco.Recipes.World.Data.Repository.Ingredient
|
||||
{
|
||||
public class IngredientService
|
||||
{
|
||||
}
|
||||
}
|
||||
@@ -1,6 +0,0 @@
|
||||
namespace Francesco.Recipes.World.Repository.Instructions
|
||||
{
|
||||
public class InstructionsService
|
||||
{
|
||||
}
|
||||
}
|
||||
@@ -1,6 +0,0 @@
|
||||
namespace Francesco.Recipes.World.Repository.MediaFile
|
||||
{
|
||||
public class MediaFileService
|
||||
{
|
||||
}
|
||||
}
|
||||
@@ -1,6 +0,0 @@
|
||||
namespace Francesco.Recipes.World.Repository.Recipe
|
||||
{
|
||||
public class RecipeService
|
||||
{
|
||||
}
|
||||
}
|
||||
@@ -1,6 +0,0 @@
|
||||
namespace Francesco.Recipes.World.Repository.ShoppingLIst
|
||||
{
|
||||
public class ShoppingListService
|
||||
{
|
||||
}
|
||||
}
|
||||
@@ -1,6 +0,0 @@
|
||||
namespace Francesco.Recipes.World.Repository.Unit
|
||||
{
|
||||
public class UnitService
|
||||
{
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user