create project and customercontroller
This commit is contained in:
9
AB.Domain/AB.Domain.csproj
Normal file
9
AB.Domain/AB.Domain.csproj
Normal file
@@ -0,0 +1,9 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net6.0</TargetFramework>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<Nullable>enable</Nullable>
|
||||
</PropertyGroup>
|
||||
|
||||
</Project>
|
||||
14
AB.Domain/Entities/Customer.cs
Normal file
14
AB.Domain/Entities/Customer.cs
Normal file
@@ -0,0 +1,14 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace AB.Domain.Entities
|
||||
{
|
||||
public class Customer
|
||||
{
|
||||
Guid coutomerId;
|
||||
|
||||
}
|
||||
}
|
||||
14
AB.Domain/Entities/Product.cs
Normal file
14
AB.Domain/Entities/Product.cs
Normal file
@@ -0,0 +1,14 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace AB.Domain.Entities
|
||||
{
|
||||
public class Product
|
||||
{
|
||||
Guid productId;
|
||||
|
||||
}
|
||||
}
|
||||
14
AB.Domain/Entities/Supplier.cs
Normal file
14
AB.Domain/Entities/Supplier.cs
Normal file
@@ -0,0 +1,14 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace AB.Domain.Entities
|
||||
{
|
||||
public class Supplier
|
||||
{
|
||||
|
||||
Guid supplierId;
|
||||
}
|
||||
}
|
||||
17
AB.Domain/Exceptions/BusinessPartnerNotFoundException.cs
Normal file
17
AB.Domain/Exceptions/BusinessPartnerNotFoundException.cs
Normal file
@@ -0,0 +1,17 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace AB.Domain.Exceptions
|
||||
{
|
||||
public class BusinessPartnerNotFoundException : NotFoundException
|
||||
{
|
||||
|
||||
public BusinessPartnerNotFoundException(Guid businessPartnerId)
|
||||
: base ($"The BusinessPartner with the indetifier {businessPartnerId} was not found.")
|
||||
{ }
|
||||
|
||||
}
|
||||
}
|
||||
20
AB.Domain/Exceptions/NotFoundException.cs
Normal file
20
AB.Domain/Exceptions/NotFoundException.cs
Normal file
@@ -0,0 +1,20 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace AB.Domain.Exceptions
|
||||
{
|
||||
|
||||
[Serializable]
|
||||
public abstract class NotFoundException : Exception
|
||||
{
|
||||
public NotFoundException() { }
|
||||
public NotFoundException(string message) : base(message) { }
|
||||
public NotFoundException(string message, Exception inner) : base(message, inner) { }
|
||||
protected NotFoundException(
|
||||
System.Runtime.Serialization.SerializationInfo info,
|
||||
System.Runtime.Serialization.StreamingContext context) : base(info, context) { }
|
||||
}
|
||||
}
|
||||
12
AB.Domain/Repositories/ICustomerRepository.cs
Normal file
12
AB.Domain/Repositories/ICustomerRepository.cs
Normal file
@@ -0,0 +1,12 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace AB.Domain.Repositories
|
||||
{
|
||||
public class ICustomerRepository
|
||||
{
|
||||
}
|
||||
}
|
||||
12
AB.Domain/Repositories/ISupplierRepository.cs
Normal file
12
AB.Domain/Repositories/ISupplierRepository.cs
Normal file
@@ -0,0 +1,12 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace AB.Domain.Repositories
|
||||
{
|
||||
public class ISupplierRepository
|
||||
{
|
||||
}
|
||||
}
|
||||
12
AB.Domain/Repositories/IUnitOfWork.cs
Normal file
12
AB.Domain/Repositories/IUnitOfWork.cs
Normal file
@@ -0,0 +1,12 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace AB.Domain.Repositories
|
||||
{
|
||||
public class IUnitOfWork
|
||||
{
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user