feat(esppOrderLoader): логика синхронизации
This commit is contained in:
23
PARR.DAL/Services/Implementations/OrderService.cs
Normal file
23
PARR.DAL/Services/Implementations/OrderService.cs
Normal file
@@ -0,0 +1,23 @@
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.Extensions.Logging;
|
||||
using PARR.DAL.Context;
|
||||
using PARR.DAL.Models;
|
||||
using PARR.DAL.Services.Abstracts;
|
||||
using PARR.DAL.Services.Interfaces;
|
||||
|
||||
namespace PARR.DAL.Services.Implementations
|
||||
{
|
||||
internal class OrderService : BaseService<Order>, IOrderService
|
||||
{
|
||||
private readonly DataContext dataContext;
|
||||
|
||||
public OrderService(DataContext dataContext, ILogger<OrderService> logger) : base(logger)
|
||||
{
|
||||
this.dataContext = dataContext;
|
||||
}
|
||||
|
||||
protected override DbSet<Order> EntitySet => dataContext.Orders;
|
||||
|
||||
protected override DataContext EntitiContext => dataContext;
|
||||
}
|
||||
}
|
||||
21
PARR.DAL/Services/Implementations/OrderStatusService.cs
Normal file
21
PARR.DAL/Services/Implementations/OrderStatusService.cs
Normal file
@@ -0,0 +1,21 @@
|
||||
using PARR.DAL.Context;
|
||||
using PARR.DAL.Models;
|
||||
using PARR.DAL.Services.Interfaces;
|
||||
|
||||
namespace PARR.DAL.Services.Implementations
|
||||
{
|
||||
internal class OrderStatusService : IOrderStatusService
|
||||
{
|
||||
private readonly DataContext dataContext;
|
||||
|
||||
public OrderStatusService(DataContext dataContext)
|
||||
{
|
||||
this.dataContext = dataContext;
|
||||
}
|
||||
|
||||
public IQueryable<OrderStatus> Get()
|
||||
{
|
||||
return dataContext.OrderStatuses;
|
||||
}
|
||||
}
|
||||
}
|
||||
9
PARR.DAL/Services/Interfaces/IOrderService.cs
Normal file
9
PARR.DAL/Services/Interfaces/IOrderService.cs
Normal file
@@ -0,0 +1,9 @@
|
||||
using PARR.DAL.Models;
|
||||
using PARR.DAL.Services.Interfaces.Base;
|
||||
|
||||
namespace PARR.DAL.Services.Interfaces
|
||||
{
|
||||
public interface IOrderService : IBaseService<Order>
|
||||
{
|
||||
}
|
||||
}
|
||||
9
PARR.DAL/Services/Interfaces/IOrderStatusService.cs
Normal file
9
PARR.DAL/Services/Interfaces/IOrderStatusService.cs
Normal file
@@ -0,0 +1,9 @@
|
||||
using PARR.DAL.Models;
|
||||
|
||||
namespace PARR.DAL.Services.Interfaces
|
||||
{
|
||||
public interface IOrderStatusService
|
||||
{
|
||||
IQueryable<OrderStatus> Get();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user