a76f757081
-Refactor instruction number generation to simplify null-check and remove redundant increment - By creating an InstructionFile put Recipe Id to null for avoid Datainconsistency
20 lines
669 B
C#
20 lines
669 B
C#
namespace Francesco.Recipes.World.Repositories.Instruction
|
|
{
|
|
using Francesco.Recipes.World.Models.BackendModels.Instruction;
|
|
|
|
public interface IInstructionRepository
|
|
{
|
|
Task<Instruction> GetInstructionAsync(Guid instructionId);
|
|
|
|
Task<Instruction> CreateInstructionWithImageToRecipeAsync(Guid recipeId, string description, IFormFile? photo);
|
|
|
|
Task RemoveInstructionFromRecipeAsync(Guid recipeId, Guid instructionId);
|
|
|
|
Task SwapInstructionNumbersAsync(Instruction a, Instruction b);
|
|
|
|
Task<List<Instruction>> GetInstructionsOfRecipeAsync(Guid recipeId);
|
|
|
|
Task RenumberInstructionsAsync(Guid recipeId);
|
|
}
|
|
}
|