-
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.
fix: fix problem with the connection of the data base and the data ma…
…nagement of entires
- Loading branch information
Showing
13 changed files
with
97 additions
and
23 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
7 changes: 7 additions & 0 deletions
7
src/DistributionCenter.Application/Repositories/Concretes/ProductRepository.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,7 @@ | ||
namespace DistributionCenter.Application.Repositories.Concretes; | ||
|
||
using Bases; | ||
using Contexts.Interfaces; | ||
using Domain.Entities.Concretes; | ||
|
||
public class ProductRepository(IContext context) : BaseRepository<Product>(context) { } |
31 changes: 31 additions & 0 deletions
31
...tionCenter.Application/Tables/Components/Information/Concretes/ProductTableInformation.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,31 @@ | ||
namespace DistributionCenter.Application.Tables.Components.Information.Concretes; | ||
|
||
using Bases; | ||
|
||
public class ProductTableInformation : BaseEntityTableInformation | ||
{ | ||
protected override string ObtainTableName() | ||
{ | ||
return "product"; | ||
} | ||
|
||
protected override string ObtainGetByIdFields() | ||
{ | ||
return "name, description, weight_gr AS Weight"; | ||
} | ||
|
||
protected override string ObtainCreateFields() | ||
{ | ||
return "name, description, weight_gr"; | ||
} | ||
|
||
protected override string ObtainCreateValues() | ||
{ | ||
return "@Name, @Description, @Weight"; | ||
} | ||
|
||
protected override string ObtainUpdateFields() | ||
{ | ||
return "name = @Name, description = @Description, weight_gr = @Weight"; | ||
} | ||
} |
15 changes: 15 additions & 0 deletions
15
src/DistributionCenter.Application/Tables/Core/Concretes/ProductTable.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 DistributionCenter.Application.Tables.Core.Concretes; | ||
|
||
using Bases; | ||
using Components.Information.Concretes; | ||
using Components.Information.Interfaces; | ||
using Connections.Interfaces; | ||
using Domain.Entities.Concretes; | ||
|
||
public class ProductTable(IDbConnectionFactory dbConnectionFactory) : BaseDapperTable<Product>(dbConnectionFactory) | ||
{ | ||
public override ITableInformation GetInformation() | ||
{ | ||
return new ProductTableInformation(); | ||
} | ||
} |
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
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