ПИбд-24 Ивлеев Д.А. Лабораторная работа 1 #1
@ -6,9 +6,10 @@ public class Supply
|
||||
public int SupplierId { get; private set; }
|
||||
public int ComponentId { get; private set; }
|
||||
public double Weight { get; private set; }
|
||||
public bool Completed { get; private set; }
|
||||
public DateTime Date { get; private set; }
|
||||
|
||||
public static Supply CreateEntity(int id, int supplierid, int componentid, double weight)
|
||||
public static Supply CreateEntity(int id, int supplierid, int componentid, double weight, bool completed)
|
||||
{
|
||||
return new Supply
|
||||
{
|
||||
@ -16,6 +17,7 @@ public class Supply
|
||||
SupplierId = supplierid,
|
||||
ComponentId = componentid,
|
||||
Weight = weight,
|
||||
Completed = completed,
|
||||
Date = DateTime.Now
|
||||
};
|
||||
}
|
||||
|
@ -0,0 +1,16 @@
|
||||
using ProjectConfectionaryFactory.Entities;
|
||||
|
||||
namespace ProjectConfectionaryFactory.Repositories;
|
||||
|
||||
public interface IClientRepository
|
||||
{
|
||||
IEnumerable<Client> ReadClients();
|
||||
|
||||
Client ReadClientById(int id);
|
||||
|
||||
void CreateClient(Client client);
|
||||
|
||||
void UpdateClient(Client client);
|
||||
|
||||
void DeleteClient(int id);
|
||||
}
|
@ -0,0 +1,16 @@
|
||||
using ProjectConfectionaryFactory.Entities;
|
||||
|
||||
namespace ProjectConfectionaryFactory.Repositories;
|
||||
|
||||
public interface IComponentRepository
|
||||
{
|
||||
IEnumerable<Component> ReadComponents();
|
||||
|
||||
Component ReadComponentById(int id);
|
||||
|
||||
void CreateComponent(Component component);
|
||||
|
||||
void UpdateComponent(Component component);
|
||||
|
||||
void DeleteComponent(int id);
|
||||
}
|
@ -0,0 +1,16 @@
|
||||
using ProjectConfectionaryFactory.Entities;
|
||||
|
||||
namespace ProjectConfectionaryFactory.Repositories;
|
||||
|
||||
public interface IOrderRepository
|
||||
{
|
||||
IEnumerable<Order> ReadOrders();
|
||||
|
||||
Order ReadOrderById(int id);
|
||||
|
||||
void CreateOrder(Order order);
|
||||
|
||||
void UpdateOrder(Order order);
|
||||
|
||||
void DeleteOrder(int id);
|
||||
}
|
@ -0,0 +1,16 @@
|
||||
using ProjectConfectionaryFactory.Entities;
|
||||
|
||||
namespace ProjectConfectionaryFactory.Repositories;
|
||||
|
||||
public interface IProductRepository
|
||||
{
|
||||
IEnumerable<Product> ReadProducts();
|
||||
|
||||
Product ReadProductById(int id);
|
||||
|
||||
void CreateProduct(Product product);
|
||||
|
||||
void UpdateProduct(Product product);
|
||||
|
||||
void DeleteProduct(int id);
|
||||
}
|
@ -0,0 +1,17 @@
|
||||
using ProjectConfectionaryFactory.Entities;
|
||||
|
||||
namespace ProjectConfectionaryFactory.Repositories;
|
||||
|
||||
public interface ISupplierRepository
|
||||
{
|
||||
|
||||
IEnumerable<Supplier> ReadSuppliers();
|
||||
|
||||
Supplier ReadSupplierById(int id);
|
||||
|
||||
void CreateSupplier(Supplier supplier);
|
||||
|
||||
void UpdateSupplier(Supplier supplier);
|
||||
|
||||
void DeleteSupplier(int id);
|
||||
}
|
@ -0,0 +1,15 @@
|
||||
using ProjectConfectionaryFactory.Entities;
|
||||
|
||||
namespace ProjectConfectionaryFactory.Repositories;
|
||||
public interface ISupplyRepository
|
||||
{
|
||||
IEnumerable<Supply> ReadSupplys();
|
||||
|
||||
Supply ReadSupplyById(int id);
|
||||
|
||||
void CreateSupply(Supply supply);
|
||||
|
||||
void UpdateSupply(Supply supply);
|
||||
|
||||
void DeleteSupply(int id);
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user