Создание репозиториев

This commit is contained in:
Павел Ладягин 2024-11-05 17:54:42 +04:00
parent 23607a3d7a
commit 42f22622a6
5 changed files with 80 additions and 0 deletions

View File

@ -0,0 +1,16 @@
using FuelAndLubricants.Entities;
namespace FuelAndLubricants.Repositories;
public interface ICarRepository
{
IEnumerable<Car> ReadCars();
Car ReadCarByID(int id);
void CreateCar(Car car);
//void UpdateCar(Car car);
void DeleteCar(int id);
}

View File

@ -0,0 +1,16 @@
using FuelAndLubricants.Entities;
namespace FuelAndLubricants.Repositories;
public interface IDriverRepository
{
IEnumerable<Driver> ReadDrivers();
Driver ReadDriverByID(int id);
void CreateDriver(Driver driver);
void UpdateDriver(Driver driver);
void DeleteDriver(int id);
}

View File

@ -0,0 +1,16 @@
using FuelAndLubricants.Entities;
namespace FuelAndLubricants.Repositories;
public interface IFuelRepository
{
IEnumerable<Fuel_And_Lubricants> ReadFuels();
Fuel_And_Lubricants ReadFuelByID(int id);
void CreateDriver(Fuel_And_Lubricants fuel);
void UpdateFuel(Fuel_And_Lubricants fuel);
void DeleteFuel(int id);
}

View File

@ -0,0 +1,16 @@
using FuelAndLubricants.Entities;
namespace FuelAndLubricants.Repositories;
public interface IRouteRepository
{
IEnumerable<Route> ReadRoutes();
Route ReadRouteByID(int id);
void CreateRoute(Route route);
//void UpdateRoute(Route route);
void DeleteRoute(int id);
}

View File

@ -0,0 +1,16 @@
using FuelAndLubricants.Entities;
namespace FuelAndLubricants.Repositories;
public interface ITripRepository
{
IEnumerable<Trip> ReadTrips();
Trip ReadTripByID(int id);
void CreateTrip(Trip trip);
//void UpdateTrip(Trip trip);
void DeleteTrip(int id);
}