ПИбд-23 Ладягин П.Д. Первая л.р. #1

Open
F1rsTTeaM wants to merge 20 commits from LabWork01 into main
6 changed files with 142 additions and 0 deletions
Showing only changes of commit 0f57d551c7 - Show all commits

View File

@ -0,0 +1,28 @@
using FuelAndLubricants.Entities;
namespace FuelAndLubricants.Repositories.Implementations;
public class CarRepository : ICarRepository
{
public void CreateCar(Car car)
{
}
public void DeleteCar(int id)
{
}
public Car ReadCarByID(int id)
{
return Car.CreateEntity(0, string.Empty, string.Empty, 0, 0, 0);
}
public IEnumerable<Car> ReadCars()
{
return [];
}
public void UpdateCar(Car car)
{
}
}

View File

@ -0,0 +1,28 @@
using FuelAndLubricants.Entities;
namespace FuelAndLubricants.Repositories.Implementations;
public class DriverRepository : IDriverRepository
{
public void CreateDriver(Driver driver)
{
}
public void DeleteDriver(int id)
{
}
public Driver ReadDriverByID(int id)
{
return Driver.CreateEntity(0, string.Empty, string.Empty, 0);
}
public IEnumerable<Driver> ReadDrivers()
{
return [];
}
public void UpdateDriver(Driver driver)
{
}
}

View File

@ -0,0 +1,28 @@
using FuelAndLubricants.Entities;
namespace FuelAndLubricants.Repositories.Implementations;
public class FuelRepository : IFuelRepository
{
public void CreateDriver(Fuel_And_Lubricants fuel)
{
}
public void DeleteFuel(int id)
{
}
public Fuel_And_Lubricants ReadFuelByID(int id)
{
return Fuel_And_Lubricants.CreateEntity(0, 0, 0, 0);
}
public IEnumerable<Fuel_And_Lubricants> ReadFuels()
{
return [];
}
public void UpdateFuel(Fuel_And_Lubricants fuel)
{
}
}

View File

@ -0,0 +1,15 @@
using FuelAndLubricants.Entities;
namespace FuelAndLubricants.Repositories.Implementations;
public class RefillRepository : IRefillRepository
{
public void CreateRefill(Refill refill)
{
}
public IEnumerable<Refill> ReadRefills(DateTime? dateFrom = null, DateTime? dateTo = null, int? fuelId = null, int? carId = null)
{
return [];
}
}

View File

@ -0,0 +1,28 @@
using FuelAndLubricants.Entities;
namespace FuelAndLubricants.Repositories.Implementations;
public class RouteRepository : IRouteRepository
{
public void CreateRoute(Route route)
{
}
public void DeleteRoute(int id)
{
}
public Route ReadRouteByID(int id)
{
return Route.CreateEntity(0, string.Empty, string.Empty, 0);
}
public IEnumerable<Route> ReadRoutes()
{
return [];
}
public void UpdateRoute(Route route)
{
}
}

View File

@ -0,0 +1,15 @@
using FuelAndLubricants.Entities;
namespace FuelAndLubricants.Repositories.Implementations;
public class TripRepository : ITripRepository
{
public void CreateTrip(Trip trip)
{
}
public IEnumerable<Trip> ReadTrips(DateTime? dateFrom = null, DateTime? dateTo = null, int? carId = null, int? driverId = null, int? routeId = null)
{
return [];
}
}