diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..83fcc63
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,18 @@
+################################################################################
+# This .gitignore file was automatically created by Microsoft(R) Visual Studio.
+################################################################################
+
+/ControleInvestimentos/ControleInvestimentos.API/bin/Debug/netcoreapp3.1
+/ControleInvestimentos/ControleInvestimentos.API/obj/Debug/netcoreapp3.1
+/ControleInvestimentos/ControleInvestimentos.API/obj
+/ControleInvestimentos/ControleInvestimentos.Aplication/bin/Debug/netcoreapp3.1
+/ControleInvestimentos/ControleInvestimentos.Aplication/obj
+/ControleInvestimentos/ControleInvestimentos.Domain/bin/Debug/netcoreapp3.1
+/ControleInvestimentos/ControleInvestimentos.Domain/obj/Debug/netcoreapp3.1
+/ControleInvestimentos/ControleInvestimentos.Domain/obj
+/ControleInvestimentos/ControleInvestimentos.Domain.Core/bin/Debug/netcoreapp3.1
+/ControleInvestimentos/ControleInvestimentos.Domain.Core/obj
+/ControleInvestimentos/ControleInvestimentos.Domain.Services/bin/Debug/netcoreapp3.1
+/ControleInvestimentos/ControleInvestimentos.Domain.Services/obj
+/ControleInvestimentos/ControleInvestimentos.Infrastructure/obj/Debug/netcoreapp3.1
+/ControleInvestimentos/ControleInvestimentos.Infrastructure/obj
diff --git a/.vs/VSWorkspaceState.json b/.vs/VSWorkspaceState.json
new file mode 100644
index 0000000..6b61141
--- /dev/null
+++ b/.vs/VSWorkspaceState.json
@@ -0,0 +1,6 @@
+{
+ "ExpandedNodes": [
+ ""
+ ],
+ "PreviewInSolutionExplorer": false
+}
\ No newline at end of file
diff --git a/.vs/kinvo/v16/.suo b/.vs/kinvo/v16/.suo
new file mode 100644
index 0000000..f5c6fd6
Binary files /dev/null and b/.vs/kinvo/v16/.suo differ
diff --git a/.vs/slnx.sqlite b/.vs/slnx.sqlite
new file mode 100644
index 0000000..62abb47
Binary files /dev/null and b/.vs/slnx.sqlite differ
diff --git a/ControleInvestimentos/.vs/ControleInvestimentos/DesignTimeBuild/.dtbcache.v2 b/ControleInvestimentos/.vs/ControleInvestimentos/DesignTimeBuild/.dtbcache.v2
new file mode 100644
index 0000000..3666590
Binary files /dev/null and b/ControleInvestimentos/.vs/ControleInvestimentos/DesignTimeBuild/.dtbcache.v2 differ
diff --git a/ControleInvestimentos/.vs/ControleInvestimentos/config/applicationhost.config b/ControleInvestimentos/.vs/ControleInvestimentos/config/applicationhost.config
new file mode 100644
index 0000000..2267469
--- /dev/null
+++ b/ControleInvestimentos/.vs/ControleInvestimentos/config/applicationhost.config
@@ -0,0 +1,996 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/ControleInvestimentos/.vs/ControleInvestimentos/v16/.suo b/ControleInvestimentos/.vs/ControleInvestimentos/v16/.suo
new file mode 100644
index 0000000..44b6706
Binary files /dev/null and b/ControleInvestimentos/.vs/ControleInvestimentos/v16/.suo differ
diff --git a/ControleInvestimentos/ControleInvestimentos.API/ControleInvestimentos.API.csproj b/ControleInvestimentos/ControleInvestimentos.API/ControleInvestimentos.API.csproj
new file mode 100644
index 0000000..2def55a
--- /dev/null
+++ b/ControleInvestimentos/ControleInvestimentos.API/ControleInvestimentos.API.csproj
@@ -0,0 +1,22 @@
+
+
+
+ netcoreapp3.1
+
+
+
+
+ all
+ runtime; build; native; contentfiles; analyzers; buildtransitive
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/ControleInvestimentos/ControleInvestimentos.API/ControleInvestimentos.API.csproj.user b/ControleInvestimentos/ControleInvestimentos.API/ControleInvestimentos.API.csproj.user
new file mode 100644
index 0000000..e4f6e71
--- /dev/null
+++ b/ControleInvestimentos/ControleInvestimentos.API/ControleInvestimentos.API.csproj.user
@@ -0,0 +1,7 @@
+
+
+
+ MvcControllerEmptyScaffolder
+ root/Common/MVC/Controller
+
+
\ No newline at end of file
diff --git a/ControleInvestimentos/ControleInvestimentos.API/Controllers/ClientesController.cs b/ControleInvestimentos/ControleInvestimentos.API/Controllers/ClientesController.cs
new file mode 100644
index 0000000..e57cd5b
--- /dev/null
+++ b/ControleInvestimentos/ControleInvestimentos.API/Controllers/ClientesController.cs
@@ -0,0 +1,91 @@
+using ControleInvestimentos.Aplication.Interfaces;
+using ControleInvestimentos.Domain.Entities;
+using Microsoft.AspNetCore.Mvc;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Threading.Tasks;
+
+namespace ControleInvestimentos.API.Controllers
+{
+ [Route("[controller]")]
+ [ApiController]
+ public class ClientesController : ControllerBase
+ {
+
+ private readonly IApplicationServiceCliente _applicationServiceCliente;
+
+
+ public ClientesController(IApplicationServiceCliente applicationServiceCliente)
+ {
+ this._applicationServiceCliente = applicationServiceCliente;
+ }
+
+ [HttpGet]
+ public ActionResult> Get()
+ {
+ return Ok(_applicationServiceCliente.GetAll());
+ }
+ [HttpGet("{id}")]
+ public ActionResult Get(int id)
+ {
+ return Ok(_applicationServiceCliente.GetById(id));
+ }
+ [HttpPost]
+ public ActionResult Post([FromBody] Cliente cliente)
+ {
+ try
+ {
+ if (cliente == null)
+ return NotFound();
+ if (cliente.Id > 0)
+ cliente.Id = 0;
+
+ _applicationServiceCliente.Add(cliente);
+ return Ok("Cliente Cadastrado com sucesso!");
+ }
+ catch (Exception ex)
+ {
+
+ throw ex;
+ }
+
+
+ }
+
+ [HttpPut]
+ public ActionResult Put([FromBody] Cliente cliente)
+ {
+ try
+ {
+ if (cliente == null)
+ return NotFound();
+ _applicationServiceCliente.Update(cliente);
+ return Ok("Cliente Atualizado com sucesso!");
+ }
+ catch (Exception ex)
+ {
+
+ throw ex;
+ }
+ }
+ [HttpDelete()]
+ public ActionResult Delete([FromBody] Cliente cliente)
+ {
+ try
+ {
+ if (cliente == null)
+ return NotFound();
+
+ _applicationServiceCliente.Remove(cliente);
+ return Ok("Cliente Removido com sucesso!");
+ }
+ catch (Exception ex)
+ {
+
+ throw ex;
+ }
+
+ }
+ }
+}
diff --git a/ControleInvestimentos/ControleInvestimentos.API/Controllers/TransacoesController.cs b/ControleInvestimentos/ControleInvestimentos.API/Controllers/TransacoesController.cs
new file mode 100644
index 0000000..9db6458
--- /dev/null
+++ b/ControleInvestimentos/ControleInvestimentos.API/Controllers/TransacoesController.cs
@@ -0,0 +1,67 @@
+using ControleInvestimentos.Aplication.Interfaces;
+using ControleInvestimentos.Domain.Entities;
+using Microsoft.AspNetCore.Mvc;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Threading.Tasks;
+
+namespace ControleInvestimentos.API.Controllers
+{
+ [Route("[controller]")]
+ [ApiController]
+ public class TransacoesController : Controller
+ {
+ private readonly IApplicationServiceTransacao _applicationServiceTransacao;
+
+
+ public TransacoesController(IApplicationServiceTransacao applicationServiceTransacao)
+ {
+ this._applicationServiceTransacao = applicationServiceTransacao;
+ }
+
+ [HttpGet]
+ public ActionResult> Get()
+ {
+ return Ok(_applicationServiceTransacao.GetAll());
+ }
+ [HttpGet("{id}")]
+ public ActionResult Get(int id)
+ {
+ return Ok(_applicationServiceTransacao.GetById(id));
+ }
+ [HttpPost]
+ public ActionResult Post([FromBody] Transacao transacao)
+ {
+ try
+ {
+ if (transacao == null)
+ return NotFound();
+ if (transacao.Id > 0)
+ transacao.Id = 0;
+
+ _applicationServiceTransacao.Add(transacao);
+ return Ok("Transação Cadastrada com sucesso!");
+ }
+ catch (Exception ex)
+ {
+
+ throw ex;
+ }
+ }
+
+ [HttpGet("/GetGroupByAcao")]
+ public ActionResult> GetGroupByAcao()
+ {
+ return Ok(_applicationServiceTransacao.GetGroupByAcao());
+ }
+
+ [HttpGet("/GetByCliente/{id}")]
+ public ActionResult> GetByCliente(int id)
+ {
+ return Ok(_applicationServiceTransacao.GetByCliente(id));
+ }
+
+
+ }
+}
diff --git a/ControleInvestimentos/ControleInvestimentos.API/Program.cs b/ControleInvestimentos/ControleInvestimentos.API/Program.cs
new file mode 100644
index 0000000..00563e4
--- /dev/null
+++ b/ControleInvestimentos/ControleInvestimentos.API/Program.cs
@@ -0,0 +1,26 @@
+using Microsoft.AspNetCore.Hosting;
+using Microsoft.Extensions.Configuration;
+using Microsoft.Extensions.Hosting;
+using Microsoft.Extensions.Logging;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Threading.Tasks;
+
+namespace ControleInvestimentos.API
+{
+ public class Program
+ {
+ public static void Main(string[] args)
+ {
+ CreateHostBuilder(args).Build().Run();
+ }
+
+ public static IHostBuilder CreateHostBuilder(string[] args) =>
+ Host.CreateDefaultBuilder(args)
+ .ConfigureWebHostDefaults(webBuilder =>
+ {
+ webBuilder.UseStartup();
+ });
+ }
+}
diff --git a/ControleInvestimentos/ControleInvestimentos.API/Properties/launchSettings.json b/ControleInvestimentos/ControleInvestimentos.API/Properties/launchSettings.json
new file mode 100644
index 0000000..d713a78
--- /dev/null
+++ b/ControleInvestimentos/ControleInvestimentos.API/Properties/launchSettings.json
@@ -0,0 +1,30 @@
+{
+ "$schema": "http://json.schemastore.org/launchsettings.json",
+ "iisSettings": {
+ "windowsAuthentication": false,
+ "anonymousAuthentication": true,
+ "iisExpress": {
+ "applicationUrl": "http://localhost:21973",
+ "sslPort": 44332
+ }
+ },
+ "profiles": {
+ "IIS Express": {
+ "commandName": "IISExpress",
+ "launchBrowser": true,
+ "launchUrl": "",
+ "environmentVariables": {
+ "ASPNETCORE_ENVIRONMENT": "Development"
+ }
+ },
+ "ControleInvestimentos.API": {
+ "commandName": "Project",
+ "launchBrowser": true,
+ "launchUrl": "",
+ "applicationUrl": "https://localhost:5001;http://localhost:5000",
+ "environmentVariables": {
+ "ASPNETCORE_ENVIRONMENT": "Development"
+ }
+ }
+ }
+}
diff --git a/ControleInvestimentos/ControleInvestimentos.API/Startup.cs b/ControleInvestimentos/ControleInvestimentos.API/Startup.cs
new file mode 100644
index 0000000..9547ca6
--- /dev/null
+++ b/ControleInvestimentos/ControleInvestimentos.API/Startup.cs
@@ -0,0 +1,87 @@
+using ControleInvestimentos.Aplication;
+using ControleInvestimentos.Aplication.Interfaces;
+using ControleInvestimentos.Domain.Core.Interfaces.Repositorys;
+using ControleInvestimentos.Domain.Core.Interfaces.Services;
+using ControleInvestimentos.Domain.Services;
+using ControleInvestimentos.Infrastructure.Data;
+using ControleInvestimentos.Infrastructure.Data.Repositotrys;
+using Microsoft.AspNetCore.Builder;
+using Microsoft.AspNetCore.Hosting;
+using Microsoft.AspNetCore.HttpsPolicy;
+using Microsoft.AspNetCore.Mvc;
+using Microsoft.EntityFrameworkCore;
+using Microsoft.Extensions.Configuration;
+using Microsoft.Extensions.DependencyInjection;
+using Microsoft.Extensions.Hosting;
+using Microsoft.Extensions.Logging;
+using Microsoft.OpenApi.Models;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Threading.Tasks;
+
+namespace ControleInvestimentos.API
+{
+ public class Startup
+ {
+ public Startup(IConfiguration configuration)
+ {
+ Configuration = configuration;
+ }
+
+ public IConfiguration Configuration { get; }
+
+ // This method gets called by the runtime. Use this method to add services to the container.
+ public void ConfigureServices(IServiceCollection services)
+ {
+ #region [Context]
+ services.AddDbContext(options =>
+ {
+ options.UseNpgsql(Configuration.GetConnectionString("Default"),
+ assembly => assembly.MigrationsAssembly(typeof(PgSqlContext).Assembly.FullName));
+ });
+ #endregion
+
+ services.AddSwaggerGen(c =>
+ {
+ c.SwaggerDoc("v1", new OpenApiInfo { Title = "Constrole Investimentos", Version = "v1", });
+ });
+ services.AddControllers();
+
+ services.AddScoped();
+ services.AddScoped();
+ services.AddScoped();
+ services.AddScoped();
+ services.AddScoped();
+ services.AddScoped();
+ }
+
+ // This method gets called by the runtime. Use this method to configure the HTTP request pipeline.
+ public void Configure(IApplicationBuilder app, IWebHostEnvironment env)
+ {
+ if (env.IsDevelopment())
+ {
+ app.UseDeveloperExceptionPage();
+ }
+
+ app.UseHttpsRedirection();
+
+ app.UseRouting();
+
+ app.UseAuthorization();
+
+ app.UseEndpoints(endpoints =>
+ {
+ endpoints.MapControllers();
+ });
+
+ app.UseSwagger();
+
+ app.UseSwaggerUI(c =>
+ {
+ c.RoutePrefix = string.Empty;
+ c.SwaggerEndpoint("/swagger/v1/swagger.json", "v1");
+ });
+ }
+ }
+}
diff --git a/ControleInvestimentos/ControleInvestimentos.API/appsettings.Development.json b/ControleInvestimentos/ControleInvestimentos.API/appsettings.Development.json
new file mode 100644
index 0000000..8983e0f
--- /dev/null
+++ b/ControleInvestimentos/ControleInvestimentos.API/appsettings.Development.json
@@ -0,0 +1,9 @@
+{
+ "Logging": {
+ "LogLevel": {
+ "Default": "Information",
+ "Microsoft": "Warning",
+ "Microsoft.Hosting.Lifetime": "Information"
+ }
+ }
+}
diff --git a/ControleInvestimentos/ControleInvestimentos.API/appsettings.json b/ControleInvestimentos/ControleInvestimentos.API/appsettings.json
new file mode 100644
index 0000000..565d420
--- /dev/null
+++ b/ControleInvestimentos/ControleInvestimentos.API/appsettings.json
@@ -0,0 +1,13 @@
+{
+ "Logging": {
+ "LogLevel": {
+ "Default": "Information",
+ "Microsoft": "Warning",
+ "Microsoft.Hosting.Lifetime": "Information"
+ }
+ },
+ "AllowedHosts": "*",
+ "ConnectionStrings": {
+ "Default": "Server=127.0.0.1;Port=5432;Database=ControleInvestimentos;User Id=postgres;Password=satelite15;"
+ }
+}
diff --git a/ControleInvestimentos/ControleInvestimentos.Aplication/ApplicationServiceCliente.cs b/ControleInvestimentos/ControleInvestimentos.Aplication/ApplicationServiceCliente.cs
new file mode 100644
index 0000000..d98a1be
--- /dev/null
+++ b/ControleInvestimentos/ControleInvestimentos.Aplication/ApplicationServiceCliente.cs
@@ -0,0 +1,42 @@
+using ControleInvestimentos.Aplication.Interfaces;
+using ControleInvestimentos.Domain.Entities;
+using ControleInvestimentos.Domain.Core.Interfaces.Services;
+using System;
+using System.Collections.Generic;
+using System.Text;
+
+namespace ControleInvestimentos.Aplication
+{
+ public class ApplicationServiceCliente : IApplicationServiceCliente
+ {
+ private readonly IServiceCliente _serviceCliente;
+ public ApplicationServiceCliente(IServiceCliente serviceCliente)
+ {
+ _serviceCliente = serviceCliente;
+ }
+ public void Add(Cliente cliente)
+ {
+ _serviceCliente.Add(cliente);
+ }
+
+ public IEnumerable GetAll()
+ {
+ return _serviceCliente.GetAll();
+ }
+
+ public Cliente GetById(int Id)
+ {
+ return _serviceCliente.GetById(Id);
+ }
+
+ public void Remove(Cliente cliente)
+ {
+ _serviceCliente.Remove(cliente);
+ }
+
+ public void Update(Cliente cliente)
+ {
+ _serviceCliente.Update(cliente);
+ }
+ }
+}
diff --git a/ControleInvestimentos/ControleInvestimentos.Aplication/ApplicationServiceTransacao.cs b/ControleInvestimentos/ControleInvestimentos.Aplication/ApplicationServiceTransacao.cs
new file mode 100644
index 0000000..f1be2e6
--- /dev/null
+++ b/ControleInvestimentos/ControleInvestimentos.Aplication/ApplicationServiceTransacao.cs
@@ -0,0 +1,53 @@
+using ControleInvestimentos.Aplication.Interfaces;
+using ControleInvestimentos.Domain.Core.Interfaces.DTO;
+using ControleInvestimentos.Domain.Core.Interfaces.Services;
+using ControleInvestimentos.Domain.Entities;
+using System;
+using System.Collections.Generic;
+using System.Text;
+
+namespace ControleInvestimentos.Aplication
+{
+ public class ApplicationServiceTransacao : IApplicationServiceTransacao
+ {
+ private readonly IServiceTransacao _serviceTransacao;
+ public ApplicationServiceTransacao(IServiceTransacao serviceTransacao)
+ {
+ _serviceTransacao = serviceTransacao;
+ }
+ public void Add(Transacao transacao)
+ {
+ _serviceTransacao.Add(transacao);
+ }
+
+ public IEnumerable GetAll()
+ {
+ return _serviceTransacao.GetAll();
+ }
+
+ public IEnumerable GetByCliente(int id)
+ {
+ return _serviceTransacao.GetByCliente(id);
+ }
+
+ public Transacao GetById(int id)
+ {
+ return _serviceTransacao.GetById(id);
+ }
+
+ public IEnumerable GetGroupByAcao()
+ {
+ return _serviceTransacao.GetGruopByAcao();
+ }
+
+ public void Remove(Transacao transacao)
+ {
+ _serviceTransacao.Remove(transacao);
+ }
+
+ public void Update(Transacao transacao)
+ {
+ _serviceTransacao.Update(transacao);
+ }
+ }
+}
diff --git a/ControleInvestimentos/ControleInvestimentos.Aplication/ControleInvestimentos.Aplication.csproj b/ControleInvestimentos/ControleInvestimentos.Aplication/ControleInvestimentos.Aplication.csproj
new file mode 100644
index 0000000..9dea191
--- /dev/null
+++ b/ControleInvestimentos/ControleInvestimentos.Aplication/ControleInvestimentos.Aplication.csproj
@@ -0,0 +1,12 @@
+
+
+
+ netcoreapp3.1
+
+
+
+
+
+
+
+
diff --git a/ControleInvestimentos/ControleInvestimentos.Aplication/Interfaces/IApplicationServiceCliente.cs b/ControleInvestimentos/ControleInvestimentos.Aplication/Interfaces/IApplicationServiceCliente.cs
new file mode 100644
index 0000000..f9edc83
--- /dev/null
+++ b/ControleInvestimentos/ControleInvestimentos.Aplication/Interfaces/IApplicationServiceCliente.cs
@@ -0,0 +1,18 @@
+using ControleInvestimentos.Domain.Entities;
+using System.Collections.Generic;
+
+namespace ControleInvestimentos.Aplication.Interfaces
+{
+ public interface IApplicationServiceCliente
+ {
+ void Add(Cliente clienteDto);
+
+ void Update(Cliente clienteDto);
+
+ void Remove(Cliente clienteDto);
+
+ IEnumerable GetAll();
+
+ Cliente GetById(int Id);
+ }
+}
diff --git a/ControleInvestimentos/ControleInvestimentos.Aplication/Interfaces/IApplicationServiceTransacao.cs b/ControleInvestimentos/ControleInvestimentos.Aplication/Interfaces/IApplicationServiceTransacao.cs
new file mode 100644
index 0000000..e860cac
--- /dev/null
+++ b/ControleInvestimentos/ControleInvestimentos.Aplication/Interfaces/IApplicationServiceTransacao.cs
@@ -0,0 +1,23 @@
+using ControleInvestimentos.Domain.Core.Interfaces.DTO;
+using ControleInvestimentos.Domain.Entities;
+using System;
+using System.Collections.Generic;
+using System.Text;
+
+namespace ControleInvestimentos.Aplication.Interfaces
+{
+ public interface IApplicationServiceTransacao
+ {
+ void Add(Transacao transacao);
+
+ void Update(Transacao transacao);
+
+ void Remove(Transacao transacao);
+
+ IEnumerable GetAll();
+
+ Transacao GetById(int Id);
+ IEnumerable GetGroupByAcao();
+ IEnumerable GetByCliente(int id);
+ }
+}
diff --git a/ControleInvestimentos/ControleInvestimentos.Domain.Core/ControleInvestimentos.Domain.Core.csproj b/ControleInvestimentos/ControleInvestimentos.Domain.Core/ControleInvestimentos.Domain.Core.csproj
new file mode 100644
index 0000000..2e609be
--- /dev/null
+++ b/ControleInvestimentos/ControleInvestimentos.Domain.Core/ControleInvestimentos.Domain.Core.csproj
@@ -0,0 +1,11 @@
+
+
+
+ netcoreapp3.1
+
+
+
+
+
+
+
diff --git a/ControleInvestimentos/ControleInvestimentos.Domain.Core/DTO/TransacaoByAcaoDto.cs b/ControleInvestimentos/ControleInvestimentos.Domain.Core/DTO/TransacaoByAcaoDto.cs
new file mode 100644
index 0000000..ec498ba
--- /dev/null
+++ b/ControleInvestimentos/ControleInvestimentos.Domain.Core/DTO/TransacaoByAcaoDto.cs
@@ -0,0 +1,14 @@
+using System;
+using System.Collections.Generic;
+using System.Text;
+
+namespace ControleInvestimentos.Domain.Core.Interfaces.DTO
+{
+ public class TransacaoByAcaoDto
+ {
+ public string Acao { get; set; }
+ public decimal PrecoMedio { get; set; }
+ public int Quantidade { get; set; }
+ public decimal Total { get; set; }
+ }
+}
diff --git a/ControleInvestimentos/ControleInvestimentos.Domain.Core/Interfaces/Repositorys/IRepositoryBase.cs b/ControleInvestimentos/ControleInvestimentos.Domain.Core/Interfaces/Repositorys/IRepositoryBase.cs
new file mode 100644
index 0000000..a9f8d28
--- /dev/null
+++ b/ControleInvestimentos/ControleInvestimentos.Domain.Core/Interfaces/Repositorys/IRepositoryBase.cs
@@ -0,0 +1,19 @@
+using System;
+using System.Collections.Generic;
+using System.Text;
+
+namespace ControleInvestimentos.Domain.Core.Interfaces.Repositorys
+{
+ public interface IRepositoryBase where T : class
+ {
+ void Add(T obj);
+
+ void Update(T obj);
+
+ void Remove(T obj);
+
+ IEnumerable GetAll();
+
+ T GetById(int Id);
+ }
+}
diff --git a/ControleInvestimentos/ControleInvestimentos.Domain.Core/Interfaces/Repositorys/IRepositoryCliente.cs b/ControleInvestimentos/ControleInvestimentos.Domain.Core/Interfaces/Repositorys/IRepositoryCliente.cs
new file mode 100644
index 0000000..b1d72d3
--- /dev/null
+++ b/ControleInvestimentos/ControleInvestimentos.Domain.Core/Interfaces/Repositorys/IRepositoryCliente.cs
@@ -0,0 +1,11 @@
+using ControleInvestimentos.Domain.Entities;
+using System;
+using System.Collections.Generic;
+using System.Text;
+
+namespace ControleInvestimentos.Domain.Core.Interfaces.Repositorys
+{
+ public interface IRepositoryCliente:IRepositoryBase
+ {
+ }
+}
diff --git a/ControleInvestimentos/ControleInvestimentos.Domain.Core/Interfaces/Repositorys/IRepositoryTransacao.cs b/ControleInvestimentos/ControleInvestimentos.Domain.Core/Interfaces/Repositorys/IRepositoryTransacao.cs
new file mode 100644
index 0000000..34047b9
--- /dev/null
+++ b/ControleInvestimentos/ControleInvestimentos.Domain.Core/Interfaces/Repositorys/IRepositoryTransacao.cs
@@ -0,0 +1,14 @@
+using ControleInvestimentos.Domain.Core.Interfaces.DTO;
+using ControleInvestimentos.Domain.Entities;
+using System;
+using System.Collections.Generic;
+using System.Text;
+
+namespace ControleInvestimentos.Domain.Core.Interfaces.Repositorys
+{
+ public interface IRepositoryTransacao: IRepositoryBase
+ {
+ IEnumerable GetGroupByAcao();
+ IEnumerable GetByCliente(int id);
+ }
+}
diff --git a/ControleInvestimentos/ControleInvestimentos.Domain.Core/Interfaces/Services/IServiceBase.cs b/ControleInvestimentos/ControleInvestimentos.Domain.Core/Interfaces/Services/IServiceBase.cs
new file mode 100644
index 0000000..c84fbbc
--- /dev/null
+++ b/ControleInvestimentos/ControleInvestimentos.Domain.Core/Interfaces/Services/IServiceBase.cs
@@ -0,0 +1,19 @@
+using System;
+using System.Collections.Generic;
+using System.Text;
+
+namespace ControleInvestimentos.Domain.Core.Interfaces.Services
+{
+ public interface IServiceBase where T : class
+ {
+ void Add(T obj);
+
+ void Update(T obj);
+
+ void Remove(T obj);
+
+ IEnumerable GetAll();
+
+ T GetById(int id);
+ }
+}
diff --git a/ControleInvestimentos/ControleInvestimentos.Domain.Core/Interfaces/Services/IServiceCliente.cs b/ControleInvestimentos/ControleInvestimentos.Domain.Core/Interfaces/Services/IServiceCliente.cs
new file mode 100644
index 0000000..b345e5e
--- /dev/null
+++ b/ControleInvestimentos/ControleInvestimentos.Domain.Core/Interfaces/Services/IServiceCliente.cs
@@ -0,0 +1,11 @@
+using ControleInvestimentos.Domain.Entities;
+using System;
+using System.Collections.Generic;
+using System.Text;
+
+namespace ControleInvestimentos.Domain.Core.Interfaces.Services
+{
+ public interface IServiceCliente:IServiceBase
+ {
+ }
+}
diff --git a/ControleInvestimentos/ControleInvestimentos.Domain.Core/Interfaces/Services/IServiceTransacao.cs b/ControleInvestimentos/ControleInvestimentos.Domain.Core/Interfaces/Services/IServiceTransacao.cs
new file mode 100644
index 0000000..733d4fd
--- /dev/null
+++ b/ControleInvestimentos/ControleInvestimentos.Domain.Core/Interfaces/Services/IServiceTransacao.cs
@@ -0,0 +1,15 @@
+using ControleInvestimentos.Domain.Core.Interfaces.DTO;
+using ControleInvestimentos.Domain.Entities;
+using System;
+using System.Collections.Generic;
+using System.Text;
+
+namespace ControleInvestimentos.Domain.Core.Interfaces.Services
+{
+ public interface IServiceTransacao:IServiceBase
+ {
+ IEnumerable GetGruopByAcao();
+ IEnumerable GetByCliente(int id);
+ void FillClienteInTransacao(IEnumerable transacoes, Cliente cliente);
+ }
+}
diff --git a/ControleInvestimentos/ControleInvestimentos.Domain.Services/ControleInvestimentos.Domain.Services.csproj b/ControleInvestimentos/ControleInvestimentos.Domain.Services/ControleInvestimentos.Domain.Services.csproj
new file mode 100644
index 0000000..3e94dc9
--- /dev/null
+++ b/ControleInvestimentos/ControleInvestimentos.Domain.Services/ControleInvestimentos.Domain.Services.csproj
@@ -0,0 +1,11 @@
+
+
+
+ netcoreapp3.1
+
+
+
+
+
+
+
diff --git a/ControleInvestimentos/ControleInvestimentos.Domain.Services/ServiceBase.cs b/ControleInvestimentos/ControleInvestimentos.Domain.Services/ServiceBase.cs
new file mode 100644
index 0000000..63d3b15
--- /dev/null
+++ b/ControleInvestimentos/ControleInvestimentos.Domain.Services/ServiceBase.cs
@@ -0,0 +1,41 @@
+using ControleInvestimentos.Domain.Core.Interfaces.Repositorys;
+using ControleInvestimentos.Domain.Core.Interfaces.Services;
+using System;
+using System.Collections.Generic;
+using System.Text;
+
+namespace ControleInvestimentos.Domain.Services
+{
+ public class ServiceBase : IServiceBase where T : class
+ {
+ private readonly IRepositoryBase _repository;
+ public ServiceBase(IRepositoryBase repository)
+ {
+ _repository = repository;
+ }
+ public void Add(T obj)
+ {
+ _repository.Add(obj);
+ }
+
+ public IEnumerable GetAll()
+ {
+ return _repository.GetAll();
+ }
+
+ public T GetById(int id)
+ {
+ return _repository.GetById(id);
+ }
+
+ public void Remove(T obj)
+ {
+ _repository.Remove(obj);
+ }
+
+ public void Update(T obj)
+ {
+ _repository.Update(obj);
+ }
+ }
+}
diff --git a/ControleInvestimentos/ControleInvestimentos.Domain.Services/ServiceCliente.cs b/ControleInvestimentos/ControleInvestimentos.Domain.Services/ServiceCliente.cs
new file mode 100644
index 0000000..b5af291
--- /dev/null
+++ b/ControleInvestimentos/ControleInvestimentos.Domain.Services/ServiceCliente.cs
@@ -0,0 +1,19 @@
+using ControleInvestimentos.Domain.Core.Interfaces.Repositorys;
+using ControleInvestimentos.Domain.Core.Interfaces.Services;
+using ControleInvestimentos.Domain.Entities;
+using System;
+using System.Collections.Generic;
+using System.Text;
+
+namespace ControleInvestimentos.Domain.Services
+{
+ public class ServiceCliente : ServiceBase, IServiceCliente
+ {
+ private readonly IRepositoryCliente _repositoryCliente;
+
+ public ServiceCliente(IRepositoryCliente repositoryCliente) :base(repositoryCliente)
+ {
+ _repositoryCliente = repositoryCliente;
+ }
+ }
+}
diff --git a/ControleInvestimentos/ControleInvestimentos.Domain.Services/ServiceTransacao.cs b/ControleInvestimentos/ControleInvestimentos.Domain.Services/ServiceTransacao.cs
new file mode 100644
index 0000000..a5b099a
--- /dev/null
+++ b/ControleInvestimentos/ControleInvestimentos.Domain.Services/ServiceTransacao.cs
@@ -0,0 +1,43 @@
+using ControleInvestimentos.Domain.Core.Interfaces.DTO;
+using ControleInvestimentos.Domain.Core.Interfaces.Repositorys;
+using ControleInvestimentos.Domain.Core.Interfaces.Services;
+using ControleInvestimentos.Domain.Entities;
+using System;
+using System.Collections.Generic;
+using System.Text;
+
+namespace ControleInvestimentos.Domain.Services
+{
+ public class ServiceTransacao : ServiceBase, IServiceTransacao
+ {
+ private readonly IRepositoryTransacao _repositoryTransacao;
+ private readonly IRepositoryCliente _repositoryCliente;
+ public ServiceTransacao(IRepositoryTransacao repositoryTransacao,IRepositoryCliente repositoryCliente) : base(repositoryTransacao)
+ {
+ _repositoryTransacao = repositoryTransacao;
+ _repositoryCliente = repositoryCliente;
+ }
+
+ public IEnumerable GetGruopByAcao()
+ {
+ return _repositoryTransacao.GetGroupByAcao();
+ }
+
+ public IEnumerable GetByCliente(int id)
+ {
+ var transacoes = _repositoryTransacao.GetByCliente(id);
+ var cliente = _repositoryCliente.GetById(id);
+ FillClienteInTransacao(transacoes, cliente);
+ return transacoes;
+
+ }
+
+ public void FillClienteInTransacao(IEnumerable transacoes, Cliente cliente)
+ {
+ foreach (var transacao in transacoes)
+ {
+ transacao.Cliente = cliente;
+ }
+ }
+ }
+}
diff --git a/ControleInvestimentos/ControleInvestimentos.Domain/ControleInvestimentos.Domain.csproj b/ControleInvestimentos/ControleInvestimentos.Domain/ControleInvestimentos.Domain.csproj
new file mode 100644
index 0000000..33bb1de
--- /dev/null
+++ b/ControleInvestimentos/ControleInvestimentos.Domain/ControleInvestimentos.Domain.csproj
@@ -0,0 +1,16 @@
+
+
+
+ netcoreapp3.1
+
+
+
+
+
+
+ all
+ runtime; build; native; contentfiles; analyzers; buildtransitive
+
+
+
+
diff --git a/ControleInvestimentos/ControleInvestimentos.Domain/Entities/Base.cs b/ControleInvestimentos/ControleInvestimentos.Domain/Entities/Base.cs
new file mode 100644
index 0000000..931256e
--- /dev/null
+++ b/ControleInvestimentos/ControleInvestimentos.Domain/Entities/Base.cs
@@ -0,0 +1,11 @@
+using System;
+using System.Collections.Generic;
+using System.Text;
+
+namespace ControleInvestimentos.Domain.Entities
+{
+ public class Base
+ {
+ public int Id { get; set; }
+ }
+}
diff --git a/ControleInvestimentos/ControleInvestimentos.Domain/Entities/Cliente.cs b/ControleInvestimentos/ControleInvestimentos.Domain/Entities/Cliente.cs
new file mode 100644
index 0000000..497eaeb
--- /dev/null
+++ b/ControleInvestimentos/ControleInvestimentos.Domain/Entities/Cliente.cs
@@ -0,0 +1,12 @@
+using System;
+using System.Collections.Generic;
+using System.Text;
+
+namespace ControleInvestimentos.Domain.Entities
+{
+ public class Cliente: Base
+ {
+ public string Nome { get; set; }
+ public string CPF { get; set; }
+ }
+}
diff --git a/ControleInvestimentos/ControleInvestimentos.Domain/Entities/Transacao.cs b/ControleInvestimentos/ControleInvestimentos.Domain/Entities/Transacao.cs
new file mode 100644
index 0000000..6ed72e3
--- /dev/null
+++ b/ControleInvestimentos/ControleInvestimentos.Domain/Entities/Transacao.cs
@@ -0,0 +1,21 @@
+using System;
+using System.Collections.Generic;
+using System.Text;
+
+namespace ControleInvestimentos.Domain.Entities
+{
+ public class Transacao: Base
+ {
+ public int ClienteId { get; set; }
+ public Cliente Cliente { get; set; }
+ public string Acao { get; set; }
+ public decimal Preco { get; set; }
+ public int Quantidade { get; set; }
+ public decimal Subtotal { get; set; }
+ public decimal Taxa { get; set; }
+ public ETipo Tipo { get; set; }
+ public DateTime Data { get; set; }
+ }
+
+ public enum ETipo {Aplicacao,Retirada }
+}
diff --git a/ControleInvestimentos/ControleInvestimentos.Infrastructure/ControleInvestimentos.Infrastructure.csproj b/ControleInvestimentos/ControleInvestimentos.Infrastructure/ControleInvestimentos.Infrastructure.csproj
new file mode 100644
index 0000000..579785e
--- /dev/null
+++ b/ControleInvestimentos/ControleInvestimentos.Infrastructure/ControleInvestimentos.Infrastructure.csproj
@@ -0,0 +1,19 @@
+
+
+
+ netcoreapp3.1
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/ControleInvestimentos/ControleInvestimentos.Infrastructure/Data/PgSqlContext.cs b/ControleInvestimentos/ControleInvestimentos.Infrastructure/Data/PgSqlContext.cs
new file mode 100644
index 0000000..746df2a
--- /dev/null
+++ b/ControleInvestimentos/ControleInvestimentos.Infrastructure/Data/PgSqlContext.cs
@@ -0,0 +1,23 @@
+using ControleInvestimentos.Domain.Entities;
+using Microsoft.EntityFrameworkCore;
+
+
+namespace ControleInvestimentos.Infrastructure.Data
+{
+ public class PgSqlContext : DbContext
+ {
+ public PgSqlContext()
+ {
+
+ }
+ public PgSqlContext(DbContextOptions options) : base(options) { }
+
+ public DbSet Clientes { get; set; }
+ public DbSet Transacoes { get; set; }
+ protected override void OnModelCreating(ModelBuilder modelBuilder)
+ {
+ base.OnModelCreating(modelBuilder);
+ modelBuilder.ApplyConfigurationsFromAssembly(GetType().Assembly);
+ }
+ }
+}
diff --git a/ControleInvestimentos/ControleInvestimentos.Infrastructure/Data/Repositotrys/RepositoryBase.cs b/ControleInvestimentos/ControleInvestimentos.Infrastructure/Data/Repositotrys/RepositoryBase.cs
new file mode 100644
index 0000000..59a0ee6
--- /dev/null
+++ b/ControleInvestimentos/ControleInvestimentos.Infrastructure/Data/Repositotrys/RepositoryBase.cs
@@ -0,0 +1,64 @@
+using ControleInvestimentos.Domain.Core.Interfaces.Repositorys;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+
+namespace ControleInvestimentos.Infrastructure.Data.Repositotrys
+{
+ public class RepositoryBase : IRepositoryBase where T : class
+ {
+ public PgSqlContext _sqlContext;
+ public RepositoryBase(PgSqlContext sqlContext)
+ {
+ _sqlContext = sqlContext;
+ }
+ public void Add(T obj)
+ {
+ try
+ {
+ _sqlContext.Set().Add(obj);
+ _sqlContext.SaveChanges();
+ }
+ catch (Exception e)
+ {
+ throw new Exception("Erro ao persistir registro na base de dados -> Insert -> \n"+e.Message);
+ }
+ }
+
+ public IEnumerable GetAll()
+ {
+ return _sqlContext.Set().ToList();
+ }
+
+ public T GetById(int Id)
+ {
+ return _sqlContext.Set().Find(Id);
+ }
+
+ public void Remove(T obj)
+ {
+ try
+ {
+ _sqlContext.Set().Remove(obj);
+ _sqlContext.SaveChanges();
+ }
+ catch (Exception e)
+ {
+ throw new Exception("Erro ao persistir registro na base de dados -> Remove -> \n" + e.Message);
+ }
+ }
+
+ public void Update(T obj)
+ {
+ try
+ {
+ _sqlContext.Set().Update(obj);
+ _sqlContext.SaveChanges();
+ }
+ catch (Exception e)
+ {
+ throw new Exception("Erro ao persistir registro na base de dados -> Update -> \n" + e.Message);
+ }
+ }
+ }
+}
diff --git a/ControleInvestimentos/ControleInvestimentos.Infrastructure/Data/Repositotrys/RepositoryCliente.cs b/ControleInvestimentos/ControleInvestimentos.Infrastructure/Data/Repositotrys/RepositoryCliente.cs
new file mode 100644
index 0000000..31887c0
--- /dev/null
+++ b/ControleInvestimentos/ControleInvestimentos.Infrastructure/Data/Repositotrys/RepositoryCliente.cs
@@ -0,0 +1,17 @@
+using ControleInvestimentos.Domain.Core.Interfaces.Repositorys;
+using ControleInvestimentos.Domain.Entities;
+using System;
+using System.Collections.Generic;
+using System.Text;
+
+namespace ControleInvestimentos.Infrastructure.Data.Repositotrys
+{
+ public class RepositoryCliente:RepositoryBase, IRepositoryCliente
+ {
+ public PgSqlContext _sqlContext;
+ public RepositoryCliente(PgSqlContext sqlContext):base(sqlContext)
+ {
+ _sqlContext = sqlContext;
+ }
+ }
+}
diff --git a/ControleInvestimentos/ControleInvestimentos.Infrastructure/Data/Repositotrys/RepositoryTransacao.cs b/ControleInvestimentos/ControleInvestimentos.Infrastructure/Data/Repositotrys/RepositoryTransacao.cs
new file mode 100644
index 0000000..8857216
--- /dev/null
+++ b/ControleInvestimentos/ControleInvestimentos.Infrastructure/Data/Repositotrys/RepositoryTransacao.cs
@@ -0,0 +1,37 @@
+using ControleInvestimentos.Domain.Core.Interfaces.DTO;
+using ControleInvestimentos.Domain.Core.Interfaces.Repositorys;
+using ControleInvestimentos.Domain.Entities;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+
+namespace ControleInvestimentos.Infrastructure.Data.Repositotrys
+{
+ public class RepositoryTransacao : RepositoryBase, IRepositoryTransacao
+ {
+ public PgSqlContext _sqlContext;
+ public RepositoryTransacao(PgSqlContext sqlContext) : base(sqlContext)
+ {
+ _sqlContext = sqlContext;
+ }
+ public IEnumerable GetGroupByAcao()
+ {
+ var query = from t in _sqlContext.Transacoes
+ group t by t.Acao into a
+ select new TransacaoByAcaoDto
+ {
+ Acao = a.Key,
+ PrecoMedio = (a.Sum(x => (x.Tipo == ETipo.Retirada ? 0 : x.Subtotal)) + a.Sum(x => (x.Tipo == ETipo.Retirada ? 0 : x.Taxa))) / a.Sum(x => (x.Tipo == ETipo.Retirada ? 0 : x.Quantidade)),
+ Quantidade = a.Sum(x => (x.Tipo == ETipo.Retirada ? (x.Quantidade * -1) : x.Quantidade)),
+ Total = (a.Sum(x => (x.Tipo == ETipo.Retirada ? (x.Quantidade * -1) : x.Quantidade)) > 0 ? a.Sum(x => x.Subtotal) : 0)
+ };
+ return query.ToList();
+ }
+
+ public IEnumerable GetByCliente(int id)
+ {
+ return _sqlContext.Set().Where(x => x.ClienteId == id).ToList();
+ }
+ }
+}
diff --git a/ControleInvestimentos/ControleInvestimentos.Infrastructure/Migrations/20220720223726_InitialMigration.Designer.cs b/ControleInvestimentos/ControleInvestimentos.Infrastructure/Migrations/20220720223726_InitialMigration.Designer.cs
new file mode 100644
index 0000000..791d82a
--- /dev/null
+++ b/ControleInvestimentos/ControleInvestimentos.Infrastructure/Migrations/20220720223726_InitialMigration.Designer.cs
@@ -0,0 +1,91 @@
+//
+using System;
+using ControleInvestimentos.Infrastructure.Data;
+using Microsoft.EntityFrameworkCore;
+using Microsoft.EntityFrameworkCore.Infrastructure;
+using Microsoft.EntityFrameworkCore.Migrations;
+using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
+using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
+
+namespace ControleInvestimentos.Infrastructure.Migrations
+{
+ [DbContext(typeof(PgSqlContext))]
+ [Migration("20220720223726_InitialMigration")]
+ partial class InitialMigration
+ {
+ protected override void BuildTargetModel(ModelBuilder modelBuilder)
+ {
+#pragma warning disable 612, 618
+ modelBuilder
+ .HasAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn)
+ .HasAnnotation("ProductVersion", "3.1.27")
+ .HasAnnotation("Relational:MaxIdentifierLength", 63);
+
+ modelBuilder.Entity("ControleInvestimentos.Domain.Entities.Cliente", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("integer")
+ .HasAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn);
+
+ b.Property("CPF")
+ .HasColumnType("text");
+
+ b.Property("Nome")
+ .HasColumnType("text");
+
+ b.HasKey("Id");
+
+ b.ToTable("Clientes");
+ });
+
+ modelBuilder.Entity("ControleInvestimentos.Domain.Entities.Transacao", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("integer")
+ .HasAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn);
+
+ b.Property("Acao")
+ .HasColumnType("text");
+
+ b.Property("ClienteId")
+ .HasColumnType("integer");
+
+ b.Property("Data")
+ .HasColumnType("timestamp without time zone");
+
+ b.Property("Preco")
+ .HasColumnType("numeric");
+
+ b.Property("Quantidade")
+ .HasColumnType("integer");
+
+ b.Property("Subtotal")
+ .HasColumnType("numeric");
+
+ b.Property("Taxa")
+ .HasColumnType("numeric");
+
+ b.Property("Tipo")
+ .HasColumnType("integer");
+
+ b.HasKey("Id");
+
+ b.HasIndex("ClienteId");
+
+ b.ToTable("Transacoes");
+ });
+
+ modelBuilder.Entity("ControleInvestimentos.Domain.Entities.Transacao", b =>
+ {
+ b.HasOne("ControleInvestimentos.Domain.Entities.Cliente", "Cliente")
+ .WithMany()
+ .HasForeignKey("ClienteId")
+ .OnDelete(DeleteBehavior.Cascade)
+ .IsRequired();
+ });
+#pragma warning restore 612, 618
+ }
+ }
+}
diff --git a/ControleInvestimentos/ControleInvestimentos.Infrastructure/Migrations/20220720223726_InitialMigration.cs b/ControleInvestimentos/ControleInvestimentos.Infrastructure/Migrations/20220720223726_InitialMigration.cs
new file mode 100644
index 0000000..9e1860b
--- /dev/null
+++ b/ControleInvestimentos/ControleInvestimentos.Infrastructure/Migrations/20220720223726_InitialMigration.cs
@@ -0,0 +1,66 @@
+using System;
+using Microsoft.EntityFrameworkCore.Migrations;
+using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
+
+namespace ControleInvestimentos.Infrastructure.Migrations
+{
+ public partial class InitialMigration : Migration
+ {
+ protected override void Up(MigrationBuilder migrationBuilder)
+ {
+ migrationBuilder.CreateTable(
+ name: "Clientes",
+ columns: table => new
+ {
+ Id = table.Column(nullable: false)
+ .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn),
+ Nome = table.Column(nullable: true),
+ CPF = table.Column(nullable: true)
+ },
+ constraints: table =>
+ {
+ table.PrimaryKey("PK_Clientes", x => x.Id);
+ });
+
+ migrationBuilder.CreateTable(
+ name: "Transacoes",
+ columns: table => new
+ {
+ Id = table.Column(nullable: false)
+ .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn),
+ ClienteId = table.Column(nullable: false),
+ Acao = table.Column(nullable: true),
+ Preco = table.Column(nullable: false),
+ Quantidade = table.Column(nullable: false),
+ Subtotal = table.Column(nullable: false),
+ Taxa = table.Column(nullable: false),
+ Tipo = table.Column(nullable: false),
+ Data = table.Column(nullable: false)
+ },
+ constraints: table =>
+ {
+ table.PrimaryKey("PK_Transacoes", x => x.Id);
+ table.ForeignKey(
+ name: "FK_Transacoes_Clientes_ClienteId",
+ column: x => x.ClienteId,
+ principalTable: "Clientes",
+ principalColumn: "Id",
+ onDelete: ReferentialAction.Cascade);
+ });
+
+ migrationBuilder.CreateIndex(
+ name: "IX_Transacoes_ClienteId",
+ table: "Transacoes",
+ column: "ClienteId");
+ }
+
+ protected override void Down(MigrationBuilder migrationBuilder)
+ {
+ migrationBuilder.DropTable(
+ name: "Transacoes");
+
+ migrationBuilder.DropTable(
+ name: "Clientes");
+ }
+ }
+}
diff --git a/ControleInvestimentos/ControleInvestimentos.Infrastructure/Migrations/PgSqlContextModelSnapshot.cs b/ControleInvestimentos/ControleInvestimentos.Infrastructure/Migrations/PgSqlContextModelSnapshot.cs
new file mode 100644
index 0000000..e49e060
--- /dev/null
+++ b/ControleInvestimentos/ControleInvestimentos.Infrastructure/Migrations/PgSqlContextModelSnapshot.cs
@@ -0,0 +1,89 @@
+//
+using System;
+using ControleInvestimentos.Infrastructure.Data;
+using Microsoft.EntityFrameworkCore;
+using Microsoft.EntityFrameworkCore.Infrastructure;
+using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
+using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
+
+namespace ControleInvestimentos.Infrastructure.Migrations
+{
+ [DbContext(typeof(PgSqlContext))]
+ partial class PgSqlContextModelSnapshot : ModelSnapshot
+ {
+ protected override void BuildModel(ModelBuilder modelBuilder)
+ {
+#pragma warning disable 612, 618
+ modelBuilder
+ .HasAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn)
+ .HasAnnotation("ProductVersion", "3.1.27")
+ .HasAnnotation("Relational:MaxIdentifierLength", 63);
+
+ modelBuilder.Entity("ControleInvestimentos.Domain.Entities.Cliente", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("integer")
+ .HasAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn);
+
+ b.Property("CPF")
+ .HasColumnType("text");
+
+ b.Property("Nome")
+ .HasColumnType("text");
+
+ b.HasKey("Id");
+
+ b.ToTable("Clientes");
+ });
+
+ modelBuilder.Entity("ControleInvestimentos.Domain.Entities.Transacao", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("integer")
+ .HasAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn);
+
+ b.Property("Acao")
+ .HasColumnType("text");
+
+ b.Property("ClienteId")
+ .HasColumnType("integer");
+
+ b.Property("Data")
+ .HasColumnType("timestamp without time zone");
+
+ b.Property("Preco")
+ .HasColumnType("numeric");
+
+ b.Property("Quantidade")
+ .HasColumnType("integer");
+
+ b.Property("Subtotal")
+ .HasColumnType("numeric");
+
+ b.Property("Taxa")
+ .HasColumnType("numeric");
+
+ b.Property("Tipo")
+ .HasColumnType("integer");
+
+ b.HasKey("Id");
+
+ b.HasIndex("ClienteId");
+
+ b.ToTable("Transacoes");
+ });
+
+ modelBuilder.Entity("ControleInvestimentos.Domain.Entities.Transacao", b =>
+ {
+ b.HasOne("ControleInvestimentos.Domain.Entities.Cliente", "Cliente")
+ .WithMany()
+ .HasForeignKey("ClienteId")
+ .OnDelete(DeleteBehavior.Cascade)
+ .IsRequired();
+ });
+#pragma warning restore 612, 618
+ }
+ }
+}
diff --git a/ControleInvestimentos/ControleInvestimentos.Infrastructure/bin/Debug/netcoreapp3.1/ControleInvestimentos.Aplication.dll b/ControleInvestimentos/ControleInvestimentos.Infrastructure/bin/Debug/netcoreapp3.1/ControleInvestimentos.Aplication.dll
new file mode 100644
index 0000000..597d796
Binary files /dev/null and b/ControleInvestimentos/ControleInvestimentos.Infrastructure/bin/Debug/netcoreapp3.1/ControleInvestimentos.Aplication.dll differ
diff --git a/ControleInvestimentos/ControleInvestimentos.Infrastructure/bin/Debug/netcoreapp3.1/ControleInvestimentos.Aplication.pdb b/ControleInvestimentos/ControleInvestimentos.Infrastructure/bin/Debug/netcoreapp3.1/ControleInvestimentos.Aplication.pdb
new file mode 100644
index 0000000..17a823e
Binary files /dev/null and b/ControleInvestimentos/ControleInvestimentos.Infrastructure/bin/Debug/netcoreapp3.1/ControleInvestimentos.Aplication.pdb differ
diff --git a/ControleInvestimentos/ControleInvestimentos.Infrastructure/bin/Debug/netcoreapp3.1/ControleInvestimentos.Domain.Core.dll b/ControleInvestimentos/ControleInvestimentos.Infrastructure/bin/Debug/netcoreapp3.1/ControleInvestimentos.Domain.Core.dll
new file mode 100644
index 0000000..08bcc1a
Binary files /dev/null and b/ControleInvestimentos/ControleInvestimentos.Infrastructure/bin/Debug/netcoreapp3.1/ControleInvestimentos.Domain.Core.dll differ
diff --git a/ControleInvestimentos/ControleInvestimentos.Infrastructure/bin/Debug/netcoreapp3.1/ControleInvestimentos.Domain.Core.pdb b/ControleInvestimentos/ControleInvestimentos.Infrastructure/bin/Debug/netcoreapp3.1/ControleInvestimentos.Domain.Core.pdb
new file mode 100644
index 0000000..a47e8a2
Binary files /dev/null and b/ControleInvestimentos/ControleInvestimentos.Infrastructure/bin/Debug/netcoreapp3.1/ControleInvestimentos.Domain.Core.pdb differ
diff --git a/ControleInvestimentos/ControleInvestimentos.Infrastructure/bin/Debug/netcoreapp3.1/ControleInvestimentos.Domain.Services.dll b/ControleInvestimentos/ControleInvestimentos.Infrastructure/bin/Debug/netcoreapp3.1/ControleInvestimentos.Domain.Services.dll
new file mode 100644
index 0000000..ff091ce
Binary files /dev/null and b/ControleInvestimentos/ControleInvestimentos.Infrastructure/bin/Debug/netcoreapp3.1/ControleInvestimentos.Domain.Services.dll differ
diff --git a/ControleInvestimentos/ControleInvestimentos.Infrastructure/bin/Debug/netcoreapp3.1/ControleInvestimentos.Domain.Services.pdb b/ControleInvestimentos/ControleInvestimentos.Infrastructure/bin/Debug/netcoreapp3.1/ControleInvestimentos.Domain.Services.pdb
new file mode 100644
index 0000000..434f8d4
Binary files /dev/null and b/ControleInvestimentos/ControleInvestimentos.Infrastructure/bin/Debug/netcoreapp3.1/ControleInvestimentos.Domain.Services.pdb differ
diff --git a/ControleInvestimentos/ControleInvestimentos.Infrastructure/bin/Debug/netcoreapp3.1/ControleInvestimentos.Domain.dll b/ControleInvestimentos/ControleInvestimentos.Infrastructure/bin/Debug/netcoreapp3.1/ControleInvestimentos.Domain.dll
new file mode 100644
index 0000000..190cac7
Binary files /dev/null and b/ControleInvestimentos/ControleInvestimentos.Infrastructure/bin/Debug/netcoreapp3.1/ControleInvestimentos.Domain.dll differ
diff --git a/ControleInvestimentos/ControleInvestimentos.Infrastructure/bin/Debug/netcoreapp3.1/ControleInvestimentos.Domain.pdb b/ControleInvestimentos/ControleInvestimentos.Infrastructure/bin/Debug/netcoreapp3.1/ControleInvestimentos.Domain.pdb
new file mode 100644
index 0000000..0d3b57f
Binary files /dev/null and b/ControleInvestimentos/ControleInvestimentos.Infrastructure/bin/Debug/netcoreapp3.1/ControleInvestimentos.Domain.pdb differ
diff --git a/ControleInvestimentos/ControleInvestimentos.Infrastructure/bin/Debug/netcoreapp3.1/ControleInvestimentos.Infrastructure.deps.json b/ControleInvestimentos/ControleInvestimentos.Infrastructure/bin/Debug/netcoreapp3.1/ControleInvestimentos.Infrastructure.deps.json
new file mode 100644
index 0000000..d7fa3ed
--- /dev/null
+++ b/ControleInvestimentos/ControleInvestimentos.Infrastructure/bin/Debug/netcoreapp3.1/ControleInvestimentos.Infrastructure.deps.json
@@ -0,0 +1,464 @@
+{
+ "runtimeTarget": {
+ "name": ".NETCoreApp,Version=v3.1",
+ "signature": ""
+ },
+ "compilationOptions": {},
+ "targets": {
+ ".NETCoreApp,Version=v3.1": {
+ "ControleInvestimentos.Infrastructure/1.0.0": {
+ "dependencies": {
+ "ControleInvestimentos.Aplication": "1.0.0",
+ "ControleInvestimentos.Domain": "1.0.0",
+ "ControleInvestimentos.Domain.Core": "1.0.0",
+ "ControleInvestimentos.Domain.Services": "1.0.0",
+ "Microsoft.EntityFrameworkCore": "3.1.27",
+ "Npgsql.EntityFrameworkCore.PostgreSQL": "3.1.18"
+ },
+ "runtime": {
+ "ControleInvestimentos.Infrastructure.dll": {}
+ }
+ },
+ "Microsoft.Bcl.AsyncInterfaces/1.1.1": {
+ "runtime": {
+ "lib/netstandard2.1/Microsoft.Bcl.AsyncInterfaces.dll": {
+ "assemblyVersion": "1.0.0.0",
+ "fileVersion": "4.700.20.21406"
+ }
+ }
+ },
+ "Microsoft.Bcl.HashCode/1.1.1": {
+ "runtime": {
+ "lib/netcoreapp2.1/Microsoft.Bcl.HashCode.dll": {
+ "assemblyVersion": "1.0.0.0",
+ "fileVersion": "4.700.20.56604"
+ }
+ }
+ },
+ "Microsoft.EntityFrameworkCore/3.1.27": {
+ "dependencies": {
+ "Microsoft.Bcl.AsyncInterfaces": "1.1.1",
+ "Microsoft.Bcl.HashCode": "1.1.1",
+ "Microsoft.EntityFrameworkCore.Abstractions": "3.1.27",
+ "Microsoft.EntityFrameworkCore.Analyzers": "3.1.27",
+ "Microsoft.Extensions.Caching.Memory": "3.1.27",
+ "Microsoft.Extensions.DependencyInjection": "3.1.27",
+ "Microsoft.Extensions.Logging": "3.1.27",
+ "System.Collections.Immutable": "1.7.1",
+ "System.ComponentModel.Annotations": "4.7.0",
+ "System.Diagnostics.DiagnosticSource": "4.7.1"
+ },
+ "runtime": {
+ "lib/netstandard2.0/Microsoft.EntityFrameworkCore.dll": {
+ "assemblyVersion": "3.1.27.0",
+ "fileVersion": "3.100.2722.31603"
+ }
+ }
+ },
+ "Microsoft.EntityFrameworkCore.Abstractions/3.1.27": {
+ "runtime": {
+ "lib/netstandard2.0/Microsoft.EntityFrameworkCore.Abstractions.dll": {
+ "assemblyVersion": "3.1.27.0",
+ "fileVersion": "3.100.2722.31603"
+ }
+ }
+ },
+ "Microsoft.EntityFrameworkCore.Analyzers/3.1.27": {},
+ "Microsoft.EntityFrameworkCore.Relational/3.1.27": {
+ "dependencies": {
+ "Microsoft.EntityFrameworkCore": "3.1.27"
+ },
+ "runtime": {
+ "lib/netstandard2.0/Microsoft.EntityFrameworkCore.Relational.dll": {
+ "assemblyVersion": "3.1.27.0",
+ "fileVersion": "3.100.2722.31603"
+ }
+ }
+ },
+ "Microsoft.Extensions.Caching.Abstractions/3.1.27": {
+ "dependencies": {
+ "Microsoft.Extensions.Primitives": "3.1.27"
+ },
+ "runtime": {
+ "lib/netcoreapp3.1/Microsoft.Extensions.Caching.Abstractions.dll": {
+ "assemblyVersion": "3.1.27.0",
+ "fileVersion": "3.100.2722.31601"
+ }
+ }
+ },
+ "Microsoft.Extensions.Caching.Memory/3.1.27": {
+ "dependencies": {
+ "Microsoft.Extensions.Caching.Abstractions": "3.1.27",
+ "Microsoft.Extensions.DependencyInjection.Abstractions": "3.1.27",
+ "Microsoft.Extensions.Logging.Abstractions": "3.1.27",
+ "Microsoft.Extensions.Options": "3.1.27"
+ },
+ "runtime": {
+ "lib/netcoreapp3.1/Microsoft.Extensions.Caching.Memory.dll": {
+ "assemblyVersion": "3.1.27.0",
+ "fileVersion": "3.100.2722.31601"
+ }
+ }
+ },
+ "Microsoft.Extensions.Configuration/3.1.27": {
+ "dependencies": {
+ "Microsoft.Extensions.Configuration.Abstractions": "3.1.27"
+ },
+ "runtime": {
+ "lib/netcoreapp3.1/Microsoft.Extensions.Configuration.dll": {
+ "assemblyVersion": "3.1.27.0",
+ "fileVersion": "3.100.2722.31601"
+ }
+ }
+ },
+ "Microsoft.Extensions.Configuration.Abstractions/3.1.27": {
+ "dependencies": {
+ "Microsoft.Extensions.Primitives": "3.1.27"
+ },
+ "runtime": {
+ "lib/netcoreapp3.1/Microsoft.Extensions.Configuration.Abstractions.dll": {
+ "assemblyVersion": "3.1.27.0",
+ "fileVersion": "3.100.2722.31601"
+ }
+ }
+ },
+ "Microsoft.Extensions.Configuration.Binder/3.1.27": {
+ "dependencies": {
+ "Microsoft.Extensions.Configuration": "3.1.27"
+ },
+ "runtime": {
+ "lib/netcoreapp3.1/Microsoft.Extensions.Configuration.Binder.dll": {
+ "assemblyVersion": "3.1.27.0",
+ "fileVersion": "3.100.2722.31601"
+ }
+ }
+ },
+ "Microsoft.Extensions.DependencyInjection/3.1.27": {
+ "dependencies": {
+ "Microsoft.Extensions.DependencyInjection.Abstractions": "3.1.27"
+ },
+ "runtime": {
+ "lib/netcoreapp3.1/Microsoft.Extensions.DependencyInjection.dll": {
+ "assemblyVersion": "3.1.27.0",
+ "fileVersion": "3.100.2722.31601"
+ }
+ }
+ },
+ "Microsoft.Extensions.DependencyInjection.Abstractions/3.1.27": {
+ "runtime": {
+ "lib/netstandard2.0/Microsoft.Extensions.DependencyInjection.Abstractions.dll": {
+ "assemblyVersion": "3.1.27.0",
+ "fileVersion": "3.100.2722.31601"
+ }
+ }
+ },
+ "Microsoft.Extensions.Logging/3.1.27": {
+ "dependencies": {
+ "Microsoft.Extensions.Configuration.Binder": "3.1.27",
+ "Microsoft.Extensions.DependencyInjection": "3.1.27",
+ "Microsoft.Extensions.Logging.Abstractions": "3.1.27",
+ "Microsoft.Extensions.Options": "3.1.27"
+ },
+ "runtime": {
+ "lib/netcoreapp3.1/Microsoft.Extensions.Logging.dll": {
+ "assemblyVersion": "3.1.27.0",
+ "fileVersion": "3.100.2722.31601"
+ }
+ }
+ },
+ "Microsoft.Extensions.Logging.Abstractions/3.1.27": {
+ "runtime": {
+ "lib/netstandard2.0/Microsoft.Extensions.Logging.Abstractions.dll": {
+ "assemblyVersion": "3.1.27.0",
+ "fileVersion": "3.100.2722.31601"
+ }
+ }
+ },
+ "Microsoft.Extensions.Options/3.1.27": {
+ "dependencies": {
+ "Microsoft.Extensions.DependencyInjection.Abstractions": "3.1.27",
+ "Microsoft.Extensions.Primitives": "3.1.27"
+ },
+ "runtime": {
+ "lib/netcoreapp3.1/Microsoft.Extensions.Options.dll": {
+ "assemblyVersion": "3.1.27.0",
+ "fileVersion": "3.100.2722.31601"
+ }
+ }
+ },
+ "Microsoft.Extensions.Primitives/3.1.27": {
+ "runtime": {
+ "lib/netcoreapp3.1/Microsoft.Extensions.Primitives.dll": {
+ "assemblyVersion": "3.1.27.0",
+ "fileVersion": "3.100.2722.31601"
+ }
+ }
+ },
+ "Npgsql/4.1.9": {
+ "dependencies": {
+ "System.Runtime.CompilerServices.Unsafe": "4.6.0"
+ },
+ "runtime": {
+ "lib/netcoreapp3.0/Npgsql.dll": {
+ "assemblyVersion": "4.1.9.0",
+ "fileVersion": "4.1.9.0"
+ }
+ }
+ },
+ "Npgsql.EntityFrameworkCore.PostgreSQL/3.1.18": {
+ "dependencies": {
+ "Microsoft.EntityFrameworkCore": "3.1.27",
+ "Microsoft.EntityFrameworkCore.Abstractions": "3.1.27",
+ "Microsoft.EntityFrameworkCore.Relational": "3.1.27",
+ "Npgsql": "4.1.9"
+ },
+ "runtime": {
+ "lib/netstandard2.0/Npgsql.EntityFrameworkCore.PostgreSQL.dll": {
+ "assemblyVersion": "3.1.18.0",
+ "fileVersion": "3.1.18.0"
+ }
+ }
+ },
+ "System.Collections.Immutable/1.7.1": {
+ "runtime": {
+ "lib/netstandard2.0/System.Collections.Immutable.dll": {
+ "assemblyVersion": "1.2.5.0",
+ "fileVersion": "4.700.20.21406"
+ }
+ }
+ },
+ "System.ComponentModel.Annotations/4.7.0": {},
+ "System.Diagnostics.DiagnosticSource/4.7.1": {
+ "runtime": {
+ "lib/netstandard1.3/System.Diagnostics.DiagnosticSource.dll": {
+ "assemblyVersion": "4.0.5.0",
+ "fileVersion": "4.700.20.21406"
+ }
+ }
+ },
+ "System.Runtime.CompilerServices.Unsafe/4.6.0": {},
+ "ControleInvestimentos.Aplication/1.0.0": {
+ "dependencies": {
+ "ControleInvestimentos.Domain": "1.0.0",
+ "ControleInvestimentos.Domain.Core": "1.0.0"
+ },
+ "runtime": {
+ "ControleInvestimentos.Aplication.dll": {}
+ }
+ },
+ "ControleInvestimentos.Domain/1.0.0": {
+ "dependencies": {
+ "Microsoft.EntityFrameworkCore": "3.1.27",
+ "Microsoft.EntityFrameworkCore.Relational": "3.1.27"
+ },
+ "runtime": {
+ "ControleInvestimentos.Domain.dll": {}
+ }
+ },
+ "ControleInvestimentos.Domain.Core/1.0.0": {
+ "dependencies": {
+ "ControleInvestimentos.Domain": "1.0.0"
+ },
+ "runtime": {
+ "ControleInvestimentos.Domain.Core.dll": {}
+ }
+ },
+ "ControleInvestimentos.Domain.Services/1.0.0": {
+ "dependencies": {
+ "ControleInvestimentos.Domain.Core": "1.0.0"
+ },
+ "runtime": {
+ "ControleInvestimentos.Domain.Services.dll": {}
+ }
+ }
+ }
+ },
+ "libraries": {
+ "ControleInvestimentos.Infrastructure/1.0.0": {
+ "type": "project",
+ "serviceable": false,
+ "sha512": ""
+ },
+ "Microsoft.Bcl.AsyncInterfaces/1.1.1": {
+ "type": "package",
+ "serviceable": true,
+ "sha512": "sha512-yuvf07qFWFqtK3P/MRkEKLhn5r2UbSpVueRziSqj0yJQIKFwG1pq9mOayK3zE5qZCTs0CbrwL9M6R8VwqyGy2w==",
+ "path": "microsoft.bcl.asyncinterfaces/1.1.1",
+ "hashPath": "microsoft.bcl.asyncinterfaces.1.1.1.nupkg.sha512"
+ },
+ "Microsoft.Bcl.HashCode/1.1.1": {
+ "type": "package",
+ "serviceable": true,
+ "sha512": "sha512-MalY0Y/uM/LjXtHfX/26l2VtN4LDNZ2OE3aumNOHDLsT4fNYy2hiHXI4CXCqKpNUNm7iJ2brrc4J89UdaL56FA==",
+ "path": "microsoft.bcl.hashcode/1.1.1",
+ "hashPath": "microsoft.bcl.hashcode.1.1.1.nupkg.sha512"
+ },
+ "Microsoft.EntityFrameworkCore/3.1.27": {
+ "type": "package",
+ "serviceable": true,
+ "sha512": "sha512-AmTptPyWwGrlnRVmjeCHMDYh5rjwTntYavQa0800eyu/Kk9I2lQemtmAKCq6SfzeMu/zLJ+vXN8y51kthueOjw==",
+ "path": "microsoft.entityframeworkcore/3.1.27",
+ "hashPath": "microsoft.entityframeworkcore.3.1.27.nupkg.sha512"
+ },
+ "Microsoft.EntityFrameworkCore.Abstractions/3.1.27": {
+ "type": "package",
+ "serviceable": true,
+ "sha512": "sha512-88+hEZUDvMwyqGIWhiFW6+OO4OrGyJ14/so5iTOIGgm6Jc/U5zIPb5n+z4AmdBWtjNYANEPM0LEU+Tnahw9YXw==",
+ "path": "microsoft.entityframeworkcore.abstractions/3.1.27",
+ "hashPath": "microsoft.entityframeworkcore.abstractions.3.1.27.nupkg.sha512"
+ },
+ "Microsoft.EntityFrameworkCore.Analyzers/3.1.27": {
+ "type": "package",
+ "serviceable": true,
+ "sha512": "sha512-wWdN6nEPgj1ml5TZTGPwz5pLf7tYu3HtEEo6NNGMrnUmFd6UiVQFllquUMPxTiLEeLPchm5AEraOi/YHlBMOUw==",
+ "path": "microsoft.entityframeworkcore.analyzers/3.1.27",
+ "hashPath": "microsoft.entityframeworkcore.analyzers.3.1.27.nupkg.sha512"
+ },
+ "Microsoft.EntityFrameworkCore.Relational/3.1.27": {
+ "type": "package",
+ "serviceable": true,
+ "sha512": "sha512-AzGFX3T9ACqE5u6LAl8SEA+O7G+s6K0mTwycZUIo2gs4v1rxkulVNaz423fpeLqKDc8fwPcC1EqSNnO+TizOUw==",
+ "path": "microsoft.entityframeworkcore.relational/3.1.27",
+ "hashPath": "microsoft.entityframeworkcore.relational.3.1.27.nupkg.sha512"
+ },
+ "Microsoft.Extensions.Caching.Abstractions/3.1.27": {
+ "type": "package",
+ "serviceable": true,
+ "sha512": "sha512-dU2xLEJ8PlRjZODUvIBNUGWH7jRjzChVYSspZ6KxV1R5Sd6VKvfC16ftkx8IfqlZE9IQPZztMBhW1kfUisjMsw==",
+ "path": "microsoft.extensions.caching.abstractions/3.1.27",
+ "hashPath": "microsoft.extensions.caching.abstractions.3.1.27.nupkg.sha512"
+ },
+ "Microsoft.Extensions.Caching.Memory/3.1.27": {
+ "type": "package",
+ "serviceable": true,
+ "sha512": "sha512-6co/tehccoszXEiukN2scIseyoCE8B3WD4DTEA4FsG8u3HQv/2FTtkgXBEssrqdFBJ3xImnFz+HaUZpMHjbjhQ==",
+ "path": "microsoft.extensions.caching.memory/3.1.27",
+ "hashPath": "microsoft.extensions.caching.memory.3.1.27.nupkg.sha512"
+ },
+ "Microsoft.Extensions.Configuration/3.1.27": {
+ "type": "package",
+ "serviceable": true,
+ "sha512": "sha512-GD3olUoSWTPwr3dbQCtXj03SMP6ZPhgYMIb8mRDQ5EDyPZXCc8NeFa6u+iEIj1gcotGGTekO02f0tJg9eiN2og==",
+ "path": "microsoft.extensions.configuration/3.1.27",
+ "hashPath": "microsoft.extensions.configuration.3.1.27.nupkg.sha512"
+ },
+ "Microsoft.Extensions.Configuration.Abstractions/3.1.27": {
+ "type": "package",
+ "serviceable": true,
+ "sha512": "sha512-0ZEkooUwbOef8NwZfGbNKkxOQuS13LxpZFjYOu4wbm/fMmYIXUSSNgeIjjYP1Wmyt7j8hDSEHrqR/pdeayk2FA==",
+ "path": "microsoft.extensions.configuration.abstractions/3.1.27",
+ "hashPath": "microsoft.extensions.configuration.abstractions.3.1.27.nupkg.sha512"
+ },
+ "Microsoft.Extensions.Configuration.Binder/3.1.27": {
+ "type": "package",
+ "serviceable": true,
+ "sha512": "sha512-9Mw66pArhCwVSkmsKlg40QZuj62MF+1NQO3Y0YXnZILD61XybcG0miewSv/VVclWaxcQw6MP+Xeqz1l69Zm+gQ==",
+ "path": "microsoft.extensions.configuration.binder/3.1.27",
+ "hashPath": "microsoft.extensions.configuration.binder.3.1.27.nupkg.sha512"
+ },
+ "Microsoft.Extensions.DependencyInjection/3.1.27": {
+ "type": "package",
+ "serviceable": true,
+ "sha512": "sha512-+a9sare70XTpsfAFwCJ9Ka5zEZGvbz3bl4ul8KOTT09amXoHRgIRTLeePOXJHu8IK2sksfZHO1PMjEh+ZCG5VQ==",
+ "path": "microsoft.extensions.dependencyinjection/3.1.27",
+ "hashPath": "microsoft.extensions.dependencyinjection.3.1.27.nupkg.sha512"
+ },
+ "Microsoft.Extensions.DependencyInjection.Abstractions/3.1.27": {
+ "type": "package",
+ "serviceable": true,
+ "sha512": "sha512-LpfjoAuQFVbSMo5XhpXpEyQ6T0xD3wrcOcQqbyEXETbiMZNTQcbR7qyX5Nzb8cU9GFd1LLzz29kE6JB18MvoSg==",
+ "path": "microsoft.extensions.dependencyinjection.abstractions/3.1.27",
+ "hashPath": "microsoft.extensions.dependencyinjection.abstractions.3.1.27.nupkg.sha512"
+ },
+ "Microsoft.Extensions.Logging/3.1.27": {
+ "type": "package",
+ "serviceable": true,
+ "sha512": "sha512-MQq63N5gACHll+PJ5dkmiiVFToOsqTjLRP97fvyQvNeqx5ICfmcWVy/nBLrL2BKMboF6ci/h6UKFqRtpNVfLfQ==",
+ "path": "microsoft.extensions.logging/3.1.27",
+ "hashPath": "microsoft.extensions.logging.3.1.27.nupkg.sha512"
+ },
+ "Microsoft.Extensions.Logging.Abstractions/3.1.27": {
+ "type": "package",
+ "serviceable": true,
+ "sha512": "sha512-alKZjFaM7C4DNbuDxtJgubp6Ou/UmXxgEDwE2jWa3gD6reAOiDEg9Y955w9CKozdmVpa2qh32JSvacO+LIpOpw==",
+ "path": "microsoft.extensions.logging.abstractions/3.1.27",
+ "hashPath": "microsoft.extensions.logging.abstractions.3.1.27.nupkg.sha512"
+ },
+ "Microsoft.Extensions.Options/3.1.27": {
+ "type": "package",
+ "serviceable": true,
+ "sha512": "sha512-91kVzn1Q8w+7PJjBE83HDx/sk66fQOrasHSCGbKU+6cv/st2Td6G6lrAgVp+VQPmbB2o5uQTIb2rLAsPODNW6Q==",
+ "path": "microsoft.extensions.options/3.1.27",
+ "hashPath": "microsoft.extensions.options.3.1.27.nupkg.sha512"
+ },
+ "Microsoft.Extensions.Primitives/3.1.27": {
+ "type": "package",
+ "serviceable": true,
+ "sha512": "sha512-LHJTWE/IEXf56LxWqTGzeC9XFKAAVaVOhdLlo2kgVgE/8GSFrgrE5r9mRDmED27O2CHyqf9YXPX6P6BN+OZWdA==",
+ "path": "microsoft.extensions.primitives/3.1.27",
+ "hashPath": "microsoft.extensions.primitives.3.1.27.nupkg.sha512"
+ },
+ "Npgsql/4.1.9": {
+ "type": "package",
+ "serviceable": true,
+ "sha512": "sha512-Afs+nX8OWZ8PPZRj7vdtjcj0xKQDZbl8b0jXUmDBuKgzEkHatX/fPu1NtgbCin14EkoyMMxKtQnagfoMC58i+Q==",
+ "path": "npgsql/4.1.9",
+ "hashPath": "npgsql.4.1.9.nupkg.sha512"
+ },
+ "Npgsql.EntityFrameworkCore.PostgreSQL/3.1.18": {
+ "type": "package",
+ "serviceable": true,
+ "sha512": "sha512-b/g8tKEMVew45q0g1hZGUQwpzv/UE9NIyU2UNB9Ln8NNhodjhkUrzeMS49lPKFlFRW1aUK5eniKgebki/D3Aag==",
+ "path": "npgsql.entityframeworkcore.postgresql/3.1.18",
+ "hashPath": "npgsql.entityframeworkcore.postgresql.3.1.18.nupkg.sha512"
+ },
+ "System.Collections.Immutable/1.7.1": {
+ "type": "package",
+ "serviceable": true,
+ "sha512": "sha512-B43Zsz5EfMwyEbnObwRxW5u85fzJma3lrDeGcSAV1qkhSRTNY5uXAByTn9h9ddNdhM+4/YoLc/CI43umjwIl9Q==",
+ "path": "system.collections.immutable/1.7.1",
+ "hashPath": "system.collections.immutable.1.7.1.nupkg.sha512"
+ },
+ "System.ComponentModel.Annotations/4.7.0": {
+ "type": "package",
+ "serviceable": true,
+ "sha512": "sha512-0YFqjhp/mYkDGpU0Ye1GjE53HMp9UVfGN7seGpAMttAC0C40v5gw598jCgpbBLMmCo0E5YRLBv5Z2doypO49ZQ==",
+ "path": "system.componentmodel.annotations/4.7.0",
+ "hashPath": "system.componentmodel.annotations.4.7.0.nupkg.sha512"
+ },
+ "System.Diagnostics.DiagnosticSource/4.7.1": {
+ "type": "package",
+ "serviceable": true,
+ "sha512": "sha512-j81Lovt90PDAq8kLpaJfJKV/rWdWuEk6jfV+MBkee33vzYLEUsy4gXK8laa9V2nZlLM9VM9yA/OOQxxPEJKAMw==",
+ "path": "system.diagnostics.diagnosticsource/4.7.1",
+ "hashPath": "system.diagnostics.diagnosticsource.4.7.1.nupkg.sha512"
+ },
+ "System.Runtime.CompilerServices.Unsafe/4.6.0": {
+ "type": "package",
+ "serviceable": true,
+ "sha512": "sha512-HxozeSlipUK7dAroTYwIcGwKDeOVpQnJlpVaOkBz7CM4TsE5b/tKlQBZecTjh6FzcSbxndYaxxpsBMz+wMJeyw==",
+ "path": "system.runtime.compilerservices.unsafe/4.6.0",
+ "hashPath": "system.runtime.compilerservices.unsafe.4.6.0.nupkg.sha512"
+ },
+ "ControleInvestimentos.Aplication/1.0.0": {
+ "type": "project",
+ "serviceable": false,
+ "sha512": ""
+ },
+ "ControleInvestimentos.Domain/1.0.0": {
+ "type": "project",
+ "serviceable": false,
+ "sha512": ""
+ },
+ "ControleInvestimentos.Domain.Core/1.0.0": {
+ "type": "project",
+ "serviceable": false,
+ "sha512": ""
+ },
+ "ControleInvestimentos.Domain.Services/1.0.0": {
+ "type": "project",
+ "serviceable": false,
+ "sha512": ""
+ }
+ }
+}
\ No newline at end of file
diff --git a/ControleInvestimentos/ControleInvestimentos.Infrastructure/bin/Debug/netcoreapp3.1/ControleInvestimentos.Infrastructure.dll b/ControleInvestimentos/ControleInvestimentos.Infrastructure/bin/Debug/netcoreapp3.1/ControleInvestimentos.Infrastructure.dll
new file mode 100644
index 0000000..c9348a0
Binary files /dev/null and b/ControleInvestimentos/ControleInvestimentos.Infrastructure/bin/Debug/netcoreapp3.1/ControleInvestimentos.Infrastructure.dll differ
diff --git a/ControleInvestimentos/ControleInvestimentos.Infrastructure/bin/Debug/netcoreapp3.1/ControleInvestimentos.Infrastructure.pdb b/ControleInvestimentos/ControleInvestimentos.Infrastructure/bin/Debug/netcoreapp3.1/ControleInvestimentos.Infrastructure.pdb
new file mode 100644
index 0000000..5e754d7
Binary files /dev/null and b/ControleInvestimentos/ControleInvestimentos.Infrastructure/bin/Debug/netcoreapp3.1/ControleInvestimentos.Infrastructure.pdb differ
diff --git a/ControleInvestimentos/ControleInvestimentos.sln b/ControleInvestimentos/ControleInvestimentos.sln
new file mode 100644
index 0000000..d281130
--- /dev/null
+++ b/ControleInvestimentos/ControleInvestimentos.sln
@@ -0,0 +1,71 @@
+
+Microsoft Visual Studio Solution File, Format Version 12.00
+# Visual Studio Version 16
+VisualStudioVersion = 16.0.31424.327
+MinimumVisualStudioVersion = 10.0.40219.1
+Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "01-Services", "01-Services", "{E035D7EF-18C8-48E7-91B7-6FC4212765EA}"
+EndProject
+Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "02-Application", "02-Application", "{5F7C9116-8012-4917-87A9-314AC9CD58D0}"
+EndProject
+Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "04-Infrastructure", "04-Infrastructure", "{83543C16-A31F-44F2-AC4E-B72531E2747B}"
+EndProject
+Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "03-Domain", "03-Domain", "{690F0C1D-2565-4DFF-8433-ED8EAA56B59B}"
+EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ControleInvestimentos.API", "ControleInvestimentos.API\ControleInvestimentos.API.csproj", "{CD431824-406E-4C84-8FEC-A5A6B0399F6E}"
+EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ControleInvestimentos.Aplication", "ControleInvestimentos.Aplication\ControleInvestimentos.Aplication.csproj", "{E1EA857B-CF1A-465A-89C0-3ED7549A2C18}"
+EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ControleInvestimentos.Domain", "ControleInvestimentos.Domain\ControleInvestimentos.Domain.csproj", "{3632DC7E-7856-48C9-93AC-7580BCCBE3E6}"
+EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ControleInvestimentos.Domain.Core", "ControleInvestimentos.Domain.Core\ControleInvestimentos.Domain.Core.csproj", "{54D73642-0629-4114-9663-A3BB1980A0F5}"
+EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ControleInvestimentos.Domain.Services", "ControleInvestimentos.Domain.Services\ControleInvestimentos.Domain.Services.csproj", "{6E592263-3C19-4097-9322-EB1D3DDE4172}"
+EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ControleInvestimentos.Infrastructure", "ControleInvestimentos.Infrastructure\ControleInvestimentos.Infrastructure.csproj", "{10FE7C81-0ADC-4824-946B-0C34F31912AF}"
+EndProject
+Global
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ Debug|Any CPU = Debug|Any CPU
+ Release|Any CPU = Release|Any CPU
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {CD431824-406E-4C84-8FEC-A5A6B0399F6E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {CD431824-406E-4C84-8FEC-A5A6B0399F6E}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {CD431824-406E-4C84-8FEC-A5A6B0399F6E}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {CD431824-406E-4C84-8FEC-A5A6B0399F6E}.Release|Any CPU.Build.0 = Release|Any CPU
+ {E1EA857B-CF1A-465A-89C0-3ED7549A2C18}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {E1EA857B-CF1A-465A-89C0-3ED7549A2C18}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {E1EA857B-CF1A-465A-89C0-3ED7549A2C18}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {E1EA857B-CF1A-465A-89C0-3ED7549A2C18}.Release|Any CPU.Build.0 = Release|Any CPU
+ {3632DC7E-7856-48C9-93AC-7580BCCBE3E6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {3632DC7E-7856-48C9-93AC-7580BCCBE3E6}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {3632DC7E-7856-48C9-93AC-7580BCCBE3E6}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {3632DC7E-7856-48C9-93AC-7580BCCBE3E6}.Release|Any CPU.Build.0 = Release|Any CPU
+ {54D73642-0629-4114-9663-A3BB1980A0F5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {54D73642-0629-4114-9663-A3BB1980A0F5}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {54D73642-0629-4114-9663-A3BB1980A0F5}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {54D73642-0629-4114-9663-A3BB1980A0F5}.Release|Any CPU.Build.0 = Release|Any CPU
+ {6E592263-3C19-4097-9322-EB1D3DDE4172}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {6E592263-3C19-4097-9322-EB1D3DDE4172}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {6E592263-3C19-4097-9322-EB1D3DDE4172}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {6E592263-3C19-4097-9322-EB1D3DDE4172}.Release|Any CPU.Build.0 = Release|Any CPU
+ {10FE7C81-0ADC-4824-946B-0C34F31912AF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {10FE7C81-0ADC-4824-946B-0C34F31912AF}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {10FE7C81-0ADC-4824-946B-0C34F31912AF}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {10FE7C81-0ADC-4824-946B-0C34F31912AF}.Release|Any CPU.Build.0 = Release|Any CPU
+ EndGlobalSection
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
+ EndGlobalSection
+ GlobalSection(NestedProjects) = preSolution
+ {CD431824-406E-4C84-8FEC-A5A6B0399F6E} = {E035D7EF-18C8-48E7-91B7-6FC4212765EA}
+ {E1EA857B-CF1A-465A-89C0-3ED7549A2C18} = {5F7C9116-8012-4917-87A9-314AC9CD58D0}
+ {3632DC7E-7856-48C9-93AC-7580BCCBE3E6} = {690F0C1D-2565-4DFF-8433-ED8EAA56B59B}
+ {54D73642-0629-4114-9663-A3BB1980A0F5} = {690F0C1D-2565-4DFF-8433-ED8EAA56B59B}
+ {6E592263-3C19-4097-9322-EB1D3DDE4172} = {690F0C1D-2565-4DFF-8433-ED8EAA56B59B}
+ {10FE7C81-0ADC-4824-946B-0C34F31912AF} = {83543C16-A31F-44F2-AC4E-B72531E2747B}
+ EndGlobalSection
+ GlobalSection(ExtensibilityGlobals) = postSolution
+ SolutionGuid = {990B263C-6565-4F5A-A3BB-9012DAD5A89F}
+ EndGlobalSection
+EndGlobal