Skip to content

Commit a053f80

Browse files
feat(application) : refactor namespaces and introduce service structure
- Migrated model classes from `CoreXCrud.Models` to `CoreXCrud.Entities`. - Updated controller files to reflect the new namespace structure. - Added a new folder for `Models` in the project file. - Introduced empty service interfaces and classes for `OrderDetail`, `Order`, `Product`, and `User`, organized under their respective namespaces. - Maintained existing FluentValidation and Serilog integrations for validation and logging. - This refactor aims to enhance project organization and modularity. <-- This commit message was generated with GitHub Copilot in Visual Studio. -->
1 parent b6709a3 commit a053f80

21 files changed

+64
-12
lines changed

Controllers/OrderDetailsController.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
using AutoMapper;
2-
using CoreXCrud.Models;
32
using CoreXCrud.Repositories;
43
using FluentValidation;
54
using Microsoft.AspNetCore.Mvc;
65
using Microsoft.AspNetCore.Authorization;
76
using CoreXCrud.DTOs.OrderDetailDtos;
7+
using CoreXCrud.Entities;
88

99
namespace CoreXCrud.Controllers
1010
{

Controllers/OrdersController.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
using AutoMapper;
2-
using CoreXCrud.Models;
32
using CoreXCrud.Repositories;
43
using FluentValidation;
54
using Microsoft.AspNetCore.Mvc;
65
using Microsoft.AspNetCore.Authorization;
76
using Serilog;
87
using CoreXCrud.DTOs.OrderDtos;
8+
using CoreXCrud.Entities;
99

1010
namespace CoreXCrud.Controllers
1111
{

Controllers/ProductsController.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
using AutoMapper;
22
using CoreXCrud.DTOs.ProductDtos;
3-
using CoreXCrud.Models;
3+
using CoreXCrud.Entities;
44
using CoreXCrud.Repositories;
55
using FluentValidation;
66
using Microsoft.AspNetCore.Authorization;

Controllers/UsersController.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
using AutoMapper;
2-
using CoreXCrud.Models;
32
using CoreXCrud.Repositories;
43
using FluentValidation;
54
using Microsoft.AspNetCore.Mvc;
65
using Microsoft.AspNetCore.Authorization;
76
using CoreXCrud.DTOs.UserDtos;
7+
using CoreXCrud.Entities;
88

99
namespace CoreXCrud.Controllers
1010
{

CoreXCrud.csproj

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,4 +27,8 @@
2727
<PackageReference Include="Swashbuckle.AspNetCore" Version="6.6.2" />
2828
</ItemGroup>
2929

30+
<ItemGroup>
31+
<Folder Include="Models\" />
32+
</ItemGroup>
33+
3034
</Project>

Data/AppDbContext.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
using Microsoft.EntityFrameworkCore;
2-
using CoreXCrud.Models;
2+
using CoreXCrud.Entities;
33

44
namespace CoreXCrud.Data
55
{

Models/Order.cs renamed to Entities/Order.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
using System.ComponentModel.DataAnnotations;
22
using System.ComponentModel.DataAnnotations.Schema;
33

4-
namespace CoreXCrud.Models
4+
namespace CoreXCrud.Entities
55
{
66
/// <summary>
77
/// Sipariş tablosu modeli.

Models/OrderDetail.cs renamed to Entities/OrderDetail.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
using System.ComponentModel.DataAnnotations;
22
using System.ComponentModel.DataAnnotations.Schema;
33

4-
namespace CoreXCrud.Models
4+
namespace CoreXCrud.Entities
55
{
66
/// <summary>
77
/// Sipariş-Ürün Many-to-Many ilişkisini yöneten model.

Models/Product.cs renamed to Entities/Product.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
using System.ComponentModel.DataAnnotations;
22
using System.ComponentModel.DataAnnotations.Schema;
33

4-
namespace CoreXCrud.Models
4+
namespace CoreXCrud.Entities
55
{
66
/// <summary>
77
/// Ürün tablosu modeli.

Models/User.cs renamed to Entities/User.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
using System.ComponentModel.DataAnnotations;
22
using System.ComponentModel.DataAnnotations.Schema;
33

4-
namespace CoreXCrud.Models
4+
namespace CoreXCrud.Entities
55
{
66
/// <summary>
77
/// Kullanıcı tablosu modeli.

0 commit comments

Comments
 (0)