-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #4 from rcdmk/translate-to-english
Translate to project to english
- Loading branch information
Showing
75 changed files
with
694 additions
and
766 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,13 @@ | ||
# Projeto de estrutura DDD | ||
# DDD structure project | ||
|
||
[![Build status](https://ci.appveyor.com/api/projects/status/799cc3qwne3d6el0?svg=true)](https://ci.appveyor.com/project/rcdmk/testepraticoddd) | ||
|
||
Este projeto utiliza diversos padrões de desenvolvimento como modelo de aprendizado: | ||
This project uses diverse development patterns as learning model: | ||
|
||
* DDD - Arquitetura orientada ao domínio | ||
* SelfValidation - As entidades possuem auto validação e são responsáveis por seu estado de validade com regras de negócio. | ||
* Repository - A comunicação com a camada de dados é efetuada através de repositórios | ||
* Application Services - O acesso aos dados é efetuado através de serviços WCF | ||
* ... (mais por vir) | ||
* DDD - Domain oriented architecture | ||
* SelfValidation - Entities have auto-validation and are responsible for their own business rules validity state. | ||
* Repository - The data layer communication is done through repositories | ||
* Application Services - Data access is done through application services that can be reused by different applications (eg. Web and gRPC Services) | ||
* AutoMapper - Mapping from entities to and from view models and DTOs is handled by AutoMapper | ||
* IoC - Dependency injection is handled by .Net Core DI framework | ||
* ... (more to come) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,27 +1,22 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using System.Linq.Expressions; | ||
using System.Text; | ||
using System.Threading.Tasks; | ||
using System.Linq.Expressions; | ||
using TestePratico.Domain.Validation; | ||
|
||
namespace TestePratico.Application.Interfaces | ||
{ | ||
public interface IAppServiceBase<TEntity> : IDisposable where TEntity : class | ||
{ | ||
TEntity GetById(int id); | ||
public interface IAppServiceBase<TEntity> : IDisposable where TEntity : class | ||
{ | ||
TEntity GetById(int id); | ||
|
||
IEnumerable<TEntity> GetAll(); | ||
IEnumerable<TEntity> GetAll(); | ||
|
||
IEnumerable<TEntity> Find(Expression<Func<TEntity, bool>> filter); | ||
IEnumerable<TEntity> Find(Expression<Func<TEntity, bool>> filter); | ||
|
||
ValidationResult Add(TEntity obj); | ||
ValidationResult Add(TEntity obj); | ||
|
||
ValidationResult Update(TEntity obj); | ||
ValidationResult Update(TEntity obj); | ||
|
||
ValidationResult Remove(TEntity obj); | ||
ValidationResult Remove(TEntity obj); | ||
|
||
void SaveChanges(); | ||
} | ||
void SaveChanges(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,8 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using System.Text; | ||
using System.Threading.Tasks; | ||
using TestePratico.Domain.Entities; | ||
using TestePratico.Domain.Entities; | ||
|
||
namespace TestePratico.Application.Interfaces | ||
{ | ||
public interface IPessoaAppService : IAppServiceBase<Pessoa> | ||
{ | ||
} | ||
public interface IPersonAppService : IAppServiceBase<Person> | ||
{ | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,8 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using System.Text; | ||
using System.Threading.Tasks; | ||
using TestePratico.Domain.Entities; | ||
using TestePratico.Domain.Entities; | ||
|
||
namespace TestePratico.Application.Interfaces | ||
{ | ||
public interface IUFAppService : IAppServiceBase<UF> | ||
{ | ||
} | ||
public interface IUFAppService : IAppServiceBase<UF> | ||
{ | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
using TestePratico.Application.Interfaces; | ||
using TestePratico.Domain.Entities; | ||
using TestePratico.Domain.Interfaces.Services; | ||
|
||
namespace TestePratico.Application | ||
{ | ||
public class PersonAppService : AppServiceBase<Person>, IPersonAppService | ||
{ | ||
private readonly IPersonService service; | ||
|
||
public PersonAppService(IPersonService service) | ||
: base(service) | ||
{ | ||
this.service = service; | ||
} | ||
} | ||
} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
22 changes: 9 additions & 13 deletions
22
....Data/EntityConfig/PessoaConfiguration.cs → ....Data/EntityConfig/PersonConfiguration.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
28 changes: 13 additions & 15 deletions
28
TestePratico.Data/Migrations/20221028183827_Initial setup.Designer.cs
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.