This commit is contained in:
kagbie3nn@mail.ru 2024-06-01 01:56:48 +04:00
parent a77846b9bf
commit 0ef6e47611
2 changed files with 1 additions and 15 deletions

View File

@ -21,8 +21,7 @@ namespace ZooDataBaseImplement.Models
public string CostName { get; set; } = string.Empty;
[Required]
public double CostPrice { get; set; }
[ForeignKey("CostID")]
public virtual List<Route> Routes { get; set; } = new();
public static Cost? Create(CostBindingModel model)
{
if (model == null)

View File

@ -34,19 +34,6 @@ namespace ZooRestApi.Controllers
throw;
}
}
[HttpGet]
public List<CostViewModel> GetAllCosts()
{
try
{
return _cost.ReadList(null);
}
catch (Exception ex)
{
_logger.LogError(ex, "Ошибка получения списка маршрутов");
throw;
}
}
[HttpGet]
public Tuple<CostViewModel>? GetCost(int CostId)
{