add contracts
This commit is contained in:
parent
22f762b60b
commit
e9774d6b48
20
CarShowroom/CarShowroomContracts/BusinessLogic/ICarLogic.cs
Normal file
20
CarShowroom/CarShowroomContracts/BusinessLogic/ICarLogic.cs
Normal file
@ -0,0 +1,20 @@
|
||||
using CarShowroomDataModels.Dtos;
|
||||
using CarShowroomDataModels.SearchModel;
|
||||
using CarShowroomDataModels.Views;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace CarShowroomContracts.BusinessLogic
|
||||
{
|
||||
public interface ICarLogic
|
||||
{
|
||||
List<CarView>? ReadList(CarSearch? model);
|
||||
CarView? ReadElement(CarSearch model);
|
||||
bool Create(CarDto model);
|
||||
bool Update(CarDto model);
|
||||
bool Delete(CarDto model);
|
||||
}
|
||||
}
|
@ -0,0 +1,20 @@
|
||||
using CarShowroomDataModels.Dtos;
|
||||
using CarShowroomDataModels.SearchModel;
|
||||
using CarShowroomDataModels.Views;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace CarShowroomContracts.BusinessLogic
|
||||
{
|
||||
public interface IClientLogic
|
||||
{
|
||||
List<ClientView>? ReadList(ClientSearch? model);
|
||||
ClientView? ReadElement(ClientSearch model);
|
||||
bool Create(ClientDto model);
|
||||
bool Update(ClientDto model);
|
||||
bool Delete(ClientDto model);
|
||||
}
|
||||
}
|
@ -0,0 +1,21 @@
|
||||
using CarShowroomContracts.Dtos;
|
||||
using CarShowroomDataModels.Dtos;
|
||||
using CarShowroomDataModels.SearchModel;
|
||||
using CarShowroomDataModels.Views;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace CarShowroomContracts.BusinessLogic
|
||||
{
|
||||
public interface IEmployeeLogic
|
||||
{
|
||||
List<EmployeeView>? ReadList(EmployeeSearch? model);
|
||||
EmployeeView? ReadElement(EmployeeSearch model);
|
||||
bool Create(EmployeeDto model);
|
||||
bool Update(EmployeeDto model);
|
||||
bool Delete(EmployeeDto model);
|
||||
}
|
||||
}
|
20
CarShowroom/CarShowroomContracts/BusinessLogic/IMakeLogic.cs
Normal file
20
CarShowroom/CarShowroomContracts/BusinessLogic/IMakeLogic.cs
Normal file
@ -0,0 +1,20 @@
|
||||
using CarShowroomContracts.Dtos;
|
||||
using CarShowroomDataModels.Views;
|
||||
using CarShowroomDataModels.SearchModel;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace CarShowroomContracts.BusinessLogic
|
||||
{
|
||||
public interface IMakeLogic
|
||||
{
|
||||
List<MakeView>? ReadList(MakeSearch? model);
|
||||
MakeView? ReadElement(MakeSearch model);
|
||||
bool Create(MakeDto model);
|
||||
bool Update(MakeDto model);
|
||||
bool Delete(MakeDto model);
|
||||
}
|
||||
}
|
@ -0,0 +1,21 @@
|
||||
using CarShowroomContracts.Dtos;
|
||||
using CarShowroomDataModels.Views;
|
||||
using CarShowroomDataModels.SearchModel;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using CarShowroomDataModels.Dtos;
|
||||
|
||||
namespace CarShowroomContracts.BusinessLogic
|
||||
{
|
||||
public interface IModelLogic
|
||||
{
|
||||
List<ModelView>? ReadList(ModelSearch? model);
|
||||
ModelView? ReadElement(ModelSearch model);
|
||||
bool Create(ModelDto model);
|
||||
bool Update(ModelDto model);
|
||||
bool Delete(ModelDto model);
|
||||
}
|
||||
}
|
20
CarShowroom/CarShowroomContracts/BusinessLogic/ISaleLogic.cs
Normal file
20
CarShowroom/CarShowroomContracts/BusinessLogic/ISaleLogic.cs
Normal file
@ -0,0 +1,20 @@
|
||||
using CarShowroomDataModels.Dtos;
|
||||
using CarShowroomDataModels.SearchModel;
|
||||
using CarShowroomDataModels.Views;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace CarShowroomContracts.BusinessLogic
|
||||
{
|
||||
public interface ISaleLogic
|
||||
{
|
||||
List<SaleView>? ReadList(SaleSearch? model);
|
||||
SaleView? ReadElement(SaleSearch model);
|
||||
bool Create(SaleDto model);
|
||||
bool Update(SaleDto model);
|
||||
bool Delete(SaleDto model);
|
||||
}
|
||||
}
|
@ -0,0 +1,20 @@
|
||||
using CarShowroomDataModels.Dtos;
|
||||
using CarShowroomDataModels.SearchModel;
|
||||
using CarShowroomDataModels.Views;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace ServiceShowroomContracts.BusinessLogic
|
||||
{
|
||||
public interface IServiceLogic
|
||||
{
|
||||
List<ServiceView>? ReadList(ServiceSearch? model);
|
||||
ServiceView? ReadElement(ServiceSearch model);
|
||||
bool Create(ServiceDto model);
|
||||
bool Update(ServiceDto model);
|
||||
bool Delete(ServiceDto model);
|
||||
}
|
||||
}
|
@ -1,7 +0,0 @@
|
||||
namespace CarShowroomContracts
|
||||
{
|
||||
public class Class1
|
||||
{
|
||||
|
||||
}
|
||||
}
|
@ -0,0 +1,21 @@
|
||||
using CarShowroomDataModels.Dtos;
|
||||
using CarShowroomDataModels.SearchModel;
|
||||
using CarShowroomDataModels.Views;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace CarShowroomContracts.StorageContracts
|
||||
{
|
||||
public interface ICarStorage
|
||||
{
|
||||
List<CarView> GetFullList();
|
||||
List<CarView> GetFilteredList(CarSearch model);
|
||||
CarView? GetElement(CarSearch model);
|
||||
CarView? Insert(CarDto model);
|
||||
CarView? Update(CarDto model);
|
||||
CarView? Delete(CarDto model);
|
||||
}
|
||||
}
|
@ -0,0 +1,21 @@
|
||||
using CarShowroomDataModels.Dtos;
|
||||
using CarShowroomDataModels.SearchModel;
|
||||
using CarShowroomDataModels.Views;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace CarShowroomContracts.StorageContracts
|
||||
{
|
||||
public interface IClientStorage
|
||||
{
|
||||
List<ClientView> GetFullList();
|
||||
List<ClientView> GetFilteredList(ClientSearch model);
|
||||
ClientView? GetElement(ClientSearch model);
|
||||
ClientView? Insert(ClientDto model);
|
||||
ClientView? Update(ClientDto model);
|
||||
ClientView? Delete(ClientDto model);
|
||||
}
|
||||
}
|
@ -0,0 +1,21 @@
|
||||
using CarShowroomDataModels.Dtos;
|
||||
using CarShowroomDataModels.SearchModel;
|
||||
using CarShowroomDataModels.Views;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace CarShowroomContracts.StorageContracts
|
||||
{
|
||||
public interface IEmployeeStorage
|
||||
{
|
||||
List<EmployeeView> GetFullList();
|
||||
List<EmployeeView> GetFilteredList(EmployeeSearch model);
|
||||
EmployeeView? GetElement(EmployeeSearch model);
|
||||
EmployeeView? Insert(EmployeeDto model);
|
||||
EmployeeView? Update(EmployeeDto model);
|
||||
EmployeeView? Delete(EmployeeDto model);
|
||||
}
|
||||
}
|
@ -0,0 +1,21 @@
|
||||
using CarShowroomDataModels.Dtos;
|
||||
using CarShowroomDataModels.SearchModel;
|
||||
using CarShowroomDataModels.Views;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace CarShowroomContracts.StorageContracts
|
||||
{
|
||||
public interface IMakeStorage
|
||||
{
|
||||
List<MakeView> GetFullList();
|
||||
List<MakeView> GetFilteredList(MakeSearch model);
|
||||
MakeView? GetElement(MakeSearch model);
|
||||
MakeView? Insert(MakeDto model);
|
||||
MakeView? Update(MakeDto model);
|
||||
MakeView? Delete(MakeDto model);
|
||||
}
|
||||
}
|
@ -0,0 +1,21 @@
|
||||
using CarShowroomDataModels.Dtos;
|
||||
using CarShowroomDataModels.SearchModel;
|
||||
using CarShowroomDataModels.Views;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace CarShowroomContracts.StorageContracts
|
||||
{
|
||||
public interface IModelStorage
|
||||
{
|
||||
List<ModelView> GetFullList();
|
||||
List<ModelView> GetFilteredList(ModelSearch model);
|
||||
ModelView? GetElement(ModelSearch model);
|
||||
ModelView? Insert(ModelDto model);
|
||||
ModelView? Update(ModelDto model);
|
||||
ModelView? Delete(ModelDto model);
|
||||
}
|
||||
}
|
@ -0,0 +1,21 @@
|
||||
using CarShowroomDataModels.Dtos;
|
||||
using CarShowroomDataModels.SearchModel;
|
||||
using CarShowroomDataModels.Views;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace CarShowroomContracts.StorageContracts
|
||||
{
|
||||
public interface ISaleStorage
|
||||
{
|
||||
List<SaleView> GetFullList();
|
||||
List<SaleView> GetFilteredList(SaleSearch model);
|
||||
SaleView? GetElement(SaleSearch model);
|
||||
SaleView? Insert(SaleDto model);
|
||||
SaleView? Update(SaleDto model);
|
||||
SaleView? Delete(SaleDto model);
|
||||
}
|
||||
}
|
@ -0,0 +1,21 @@
|
||||
using CarShowroomDataModels.Dtos;
|
||||
using CarShowroomDataModels.SearchModel;
|
||||
using CarShowroomDataModels.Views;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace CarShowroomContracts.StorageContracts
|
||||
{
|
||||
public interface IServiceStorage
|
||||
{
|
||||
List<ServiceView> GetFullList();
|
||||
List<ServiceView> GetFilteredList(ServiceSearch model);
|
||||
ServiceView? GetElement(ServiceSearch model);
|
||||
ServiceView? Insert(ServiceDto model);
|
||||
ServiceView? Update(ServiceDto model);
|
||||
ServiceView? Delete(ServiceDto model);
|
||||
}
|
||||
}
|
@ -6,8 +6,4 @@
|
||||
<Nullable>enable</Nullable>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Folder Include="SearchModel\" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
|
@ -5,7 +5,7 @@ using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace CarShowroomContracts.Dtos
|
||||
namespace CarShowroomDataModels.Dtos
|
||||
{
|
||||
public class CarDto : ICar
|
||||
{
|
||||
|
@ -5,7 +5,7 @@ using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace CarShowroomContracts.Dtos
|
||||
namespace CarShowroomDataModels.Dtos
|
||||
{
|
||||
public class ClientDto : IClient
|
||||
{
|
||||
|
@ -5,7 +5,7 @@ using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace CarShowroomContracts.Dtos
|
||||
namespace CarShowroomDataModels.Dtos
|
||||
{
|
||||
public class EmployeeDto : IEmployee
|
||||
{
|
||||
|
@ -5,7 +5,7 @@ using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace CarShowroomContracts.Dtos
|
||||
namespace CarShowroomDataModels.Dtos
|
||||
{
|
||||
public class MakeDto : IMake
|
||||
{
|
||||
|
@ -5,15 +5,15 @@ using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace CarShowroomContracts.Dtos
|
||||
namespace CarShowroomDataModels.Dtos
|
||||
{
|
||||
public class ModeDto : IModel
|
||||
public class ModelDto : IModel
|
||||
{
|
||||
public int Id { get; set; }
|
||||
public string Name { get; set; }
|
||||
public int Price { get; set; }
|
||||
public int MakeId { get; set; }
|
||||
public ModeDto(IModel model)
|
||||
public ModelDto(IModel model)
|
||||
{
|
||||
Id = model.Id;
|
||||
Name = model.Name;
|
@ -7,7 +7,7 @@ using System.Threading.Tasks;
|
||||
|
||||
namespace CarShowroomDataModels.Dtos
|
||||
{
|
||||
internal class SaleDto : ISale
|
||||
public class SaleDto : ISale
|
||||
{
|
||||
public int Id { get; set; }
|
||||
public DateTime SaleTime { get; set; }
|
||||
|
@ -5,7 +5,7 @@ using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace CarShowroomContracts.Dtos
|
||||
namespace CarShowroomDataModels.Dtos
|
||||
{
|
||||
public class ServiceDto : IService
|
||||
{
|
||||
|
13
CarShowroom/CarShowroomDataModels/SearchModel/CarSearch.cs
Normal file
13
CarShowroom/CarShowroomDataModels/SearchModel/CarSearch.cs
Normal file
@ -0,0 +1,13 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace CarShowroomDataModels.SearchModel
|
||||
{
|
||||
public class CarSearch
|
||||
{
|
||||
public int? Id;
|
||||
}
|
||||
}
|
@ -0,0 +1,13 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace CarShowroomDataModels.SearchModel
|
||||
{
|
||||
public class ClientSearch
|
||||
{
|
||||
public int? Id;
|
||||
}
|
||||
}
|
@ -0,0 +1,15 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace CarShowroomDataModels.SearchModel
|
||||
{
|
||||
public class EmployeeSearch
|
||||
{
|
||||
public int? Id;
|
||||
public string? Email;
|
||||
public string? Password;
|
||||
}
|
||||
}
|
13
CarShowroom/CarShowroomDataModels/SearchModel/MakeSearch.cs
Normal file
13
CarShowroom/CarShowroomDataModels/SearchModel/MakeSearch.cs
Normal file
@ -0,0 +1,13 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace CarShowroomDataModels.SearchModel
|
||||
{
|
||||
public class MakeSearch
|
||||
{
|
||||
public int? Id;
|
||||
}
|
||||
}
|
13
CarShowroom/CarShowroomDataModels/SearchModel/ModelSearch.cs
Normal file
13
CarShowroom/CarShowroomDataModels/SearchModel/ModelSearch.cs
Normal file
@ -0,0 +1,13 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace CarShowroomDataModels.SearchModel
|
||||
{
|
||||
public class ModelSearch
|
||||
{
|
||||
public int? Id;
|
||||
}
|
||||
}
|
13
CarShowroom/CarShowroomDataModels/SearchModel/SaleSearch.cs
Normal file
13
CarShowroom/CarShowroomDataModels/SearchModel/SaleSearch.cs
Normal file
@ -0,0 +1,13 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace CarShowroomDataModels.SearchModel
|
||||
{
|
||||
public class SaleSearch
|
||||
{
|
||||
public int? Id;
|
||||
}
|
||||
}
|
@ -0,0 +1,13 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace CarShowroomDataModels.SearchModel
|
||||
{
|
||||
public class ServiceSearch
|
||||
{
|
||||
public int? Id;
|
||||
}
|
||||
}
|
@ -6,7 +6,7 @@ using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace CarShowroomContracts.Views
|
||||
namespace CarShowroomDataModels.Views
|
||||
{
|
||||
public class CarView : ICar
|
||||
{
|
||||
|
@ -6,7 +6,7 @@ using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace CarShowroomContracts.Views
|
||||
namespace CarShowroomDataModels.Views
|
||||
{
|
||||
public class ClientView : IClient
|
||||
{
|
||||
|
@ -6,7 +6,7 @@ using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace CarShowroomContracts.Views
|
||||
namespace CarShowroomDataModels.Views
|
||||
{
|
||||
public class EmployeeView : IEmployee
|
||||
{
|
||||
|
@ -6,7 +6,7 @@ using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace CarShowroomContracts.Views
|
||||
namespace CarShowroomDataModels.Views
|
||||
{
|
||||
public class MakeView : IMake
|
||||
{
|
||||
|
@ -6,7 +6,7 @@ using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace CarShowroomContracts.Views
|
||||
namespace CarShowroomDataModels.Views
|
||||
{
|
||||
public class ModelView : IModel
|
||||
{
|
||||
|
@ -5,7 +5,7 @@ using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace CarShowroomContracts.Views
|
||||
namespace CarShowroomDataModels.Views
|
||||
{
|
||||
public class ServiceView : IService
|
||||
{
|
||||
|
@ -1,5 +1,5 @@
|
||||
using CarShowroomContracts.AbstractModels;
|
||||
using CarShowroomContracts.Views;
|
||||
using CarShowroomDataModels.Views;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
|
@ -1,5 +1,5 @@
|
||||
using CarShowroomContracts.AbstractModels;
|
||||
using CarShowroomContracts.Views;
|
||||
using CarShowroomDataModels.Views;
|
||||
using CarShowroomDataModels.Models;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using System;
|
||||
|
@ -1,4 +1,4 @@
|
||||
using CarShowroomContracts.Views;
|
||||
using CarShowroomDataModels.Views;
|
||||
using CarShowroomDataModels.Models;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using System;
|
||||
|
@ -1,5 +1,5 @@
|
||||
using CarShowroomContracts.AbstractModels;
|
||||
using CarShowroomContracts.Views;
|
||||
using CarShowroomDataModels.Views;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
@ -1,5 +1,5 @@
|
||||
using CarShowroomContracts.AbstractModels;
|
||||
using CarShowroomContracts.Views;
|
||||
using CarShowroomDataModels.Views;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
@ -1,5 +1,4 @@
|
||||
using CarShowroomContracts.AbstractModels;
|
||||
using CarShowroomContracts.Views;
|
||||
using CarShowroomDataModels.Views;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
@ -1,5 +1,5 @@
|
||||
using CarShowroomContracts.AbstractModels;
|
||||
using CarShowroomContracts.Views;
|
||||
using CarShowroomDataModels.Views;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
Loading…
Reference in New Issue
Block a user