cc
This commit is contained in:
parent
a77846b9bf
commit
0ef6e47611
@ -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)
|
||||
|
@ -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)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user