-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Leonardo Porro
committed
Jan 28, 2024
1 parent
5e31b10
commit 6d55e87
Showing
62 changed files
with
590 additions
and
301 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
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
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
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
11 changes: 6 additions & 5 deletions
11
...RestApi/Models/Inputs/SaveInvoiceInput.cs → ...odels/Inputs/SaveInvoiceInput_Identity.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
18 changes: 18 additions & 0 deletions
18
sample/Detached.Samples.RestApi/Models/Inputs/SaveInvoiceInput_Primitive.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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
|
||
namespace Detached.Samples.RestApi.Models.Inputs | ||
{ | ||
public class SaveInvoiceInput_Primitive | ||
{ | ||
public int Id { get; set; } | ||
|
||
public List<SaveInvoiceRowInput_Primitive> Rows { get; set; } | ||
|
||
public int TypeId { get; set; } | ||
|
||
public int CustomerId { get; set; } | ||
|
||
public DateTime DateTime { get; set; } | ||
} | ||
} |
6 changes: 4 additions & 2 deletions
6
...tApi/Models/Inputs/SaveInvoiceRowInput.cs → ...ls/Inputs/SaveInvoiceRowInput_Identity.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
15 changes: 15 additions & 0 deletions
15
sample/Detached.Samples.RestApi/Models/Inputs/SaveInvoiceRowInput_Primitive.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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
namespace Detached.Samples.RestApi.Models.Inputs | ||
{ | ||
public class SaveInvoiceRowInput_Primitive | ||
{ | ||
public int Id { get; set; } | ||
|
||
public int SKUId { get; set; } | ||
|
||
public string Description { get; set; } | ||
|
||
public decimal UnitPrice { get; set; } | ||
|
||
public double Quantity { get; set; } | ||
} | ||
} |
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
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
8 changes: 4 additions & 4 deletions
8
sample/Detached.Samples.RestApi/Models/Outputs/InvoiceListItem.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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,8 @@ | ||
using Detached.Mappers; | ||
using Detached.Mappers.EntityFramework; | ||
using Detached.Mappers.Samples.RestApi.Models; | ||
using Detached.Mappers.Samples.RestApi.Services; | ||
using Detached.Mappers.Samples.RestApi.Stores; | ||
using Detached.Samples.RestApi.Models; | ||
using Detached.Samples.RestApi.Services; | ||
using Detached.Samples.RestApi.Stores; | ||
using Microsoft.AspNetCore.Builder; | ||
using Microsoft.AspNetCore.Hosting; | ||
using Microsoft.EntityFrameworkCore; | ||
|
@@ -11,7 +12,7 @@ | |
using System; | ||
using System.Collections.Generic; | ||
|
||
namespace Detached.Mappers.Samples.RestApi | ||
namespace Detached.Samples.RestApi | ||
{ | ||
public class Startup | ||
{ | ||
|
@@ -79,13 +80,21 @@ public void Configure(IApplicationBuilder app, IWebHostEnvironment env, MainDbCo | |
void Seed(MainDbContext db) | ||
{ | ||
db.InvoiceTypes.Add(new InvoiceType { Name = "Taxed" }); | ||
db.InvoiceTypes.Add(new InvoiceType { Name = "Free" }); | ||
db.Customers.Add(new Customer | ||
{ | ||
DocumentNumber = "123", | ||
Name = "sample customer", | ||
Email = "[email protected]", | ||
Phone = "123 456 7890" | ||
}); | ||
db.Customers.Add(new Customer | ||
{ | ||
DocumentNumber = "457", | ||
Name = "another customer", | ||
Email = "[email protected]", | ||
Phone = "123 456 7890" | ||
}); | ||
db.StockUnits.Add(new StockUnit { Name = "Potato", Quantity = 10 }); | ||
db.StockUnits.Add(new StockUnit { Name = "Tomato", Quantity = 8 }); | ||
db.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
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
13 changes: 0 additions & 13 deletions
13
src/Detached.Mappers.EntityFramework/Configuration/EntityMapperOptions.cs
This file was deleted.
Oops, something went wrong.
45 changes: 0 additions & 45 deletions
45
src/Detached.Mappers.EntityFramework/Configuration/EntityMapperOptionsBuilder.cs
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.