Mais conteúdo relacionado Semelhante a Vertical slice architecture (20) Mais de Germán Küber (20) Vertical slice architecture3. 11 de Abril
09:00 – 13:00
Microsoft
Lanzamiento de Visual Studio 2019 en Argentina
Global Azure Bootcamp 2019 - Buenos Aires
27 de Abril
08:30 – 18:30
Microsoft
http://bit.ly/gabba19
http://bit.ly/cfs-gabba19
7. ¿ Como organizamos nuestras capas?
• User.cs
• UserController.cs
• UserService.cs
• UserRepository.cs
10. public interface IPostsRepository : IBaseRespository
{
Task<Post> CreateAsync(Post newPost);
bool PostExistById(int id);
Task<Post> GetById(int id);
Task<List<Post>> GetAllByCommentIdAsync(int comment);
Task<List<Post>> GetAllByDataIdAsync(DateTime date);
Task<List<Post>> GetAllByCoordinatorIdAsync(int commentId, List<string> categories);
Task<Post> GetByIdAsync(int id);
Task<Post> GetByIdForDraftAsync(int id);
Task<List<Post>> GetAllByProviderIdAsync(int providerId);
Task<List<Post>> GetAllWithProvidersAsync();
Task<Post> GetByCommentDraftIdAsync(int idPost);
Task<Post> GetByIdAndProviderIdAsync(int idProvider, int idPost);
Task<Post> GetByIdWithQuestionAsync(int postId);
Task<Post> GetByIdWithQuestionDraftAsync(int postId);
Task<Post> GetByProviderIdWithQuestionAsync(int postId, int providerId);
Task<Post> GetSoftByIdAsync(int id);
Task<Post> GetByIdWithMilestonesAsync(int idPost);
Task<Post> GetByIdWithCommentMessageAsync(int id);
Task<Post> GetByIdAndProviderIdWithCommentMessageAsync(int postId, int providerId);
Task<Post> GetByIdWithProviderPostsAsync(int id);
Task<Post> GetByIdAndQuestionIdWithQuestionAsync(int postId, int questionId);
Task<List<Post>> GetAsync();
Task<List<Post>> FilterPosts(Filter filter);
}
13. De métodos a Clases
void BlockUser()
void AcceptUser()
void CreateUser()
UsersServices
BlockUser { }
AcceptUser { }
CreateUser { }
19. ¿Por que Vertical Slice Architecture?
• Código sencillo
• Código fácil de probar
• Separación de tests
• Aplicación fácil de dividir
Notas do Editor Azure pass 80 USD
Stickers UserRepository: Todo el tiempo cambiamos la base de datos no? Tocar en diferentes lugares Organizada entorno a lo que debe cambiar juntos.
Organiza de manera lógica todo lo que cambia junto, en un mismo lugar Un modelo entra un modelo sale