视图不能 see/defined 我的模型 类

The view cannot see/defined my models classes

我想显示所有停车位的详细信息(ID + 名称 + 状态)但是我的视图看不到我的模型class

控制器:

public async Task<IActionResult> ParkingFinder()
{
        var parking = new ParkingDto();

        using (var client = new HttpClient())
        {
            //Passing service base url
            client.BaseAddress = new Uri(Baseurl);

            //Sending request to find web api REST service resource GetCompanyParkingById using HttpClient
            int id = 5;
            HttpResponseMessage result = await client.GetAsync($"Parking/GetCompanyParkingById/{id}");

            //Checking the response is successful or not which is sent using HttpClient
            if (result.IsSuccessStatusCode)
            {
                //Storing the response details recieved from web api
                parking = result.Content.ReadAsAsync<ParkingDto>().Result;
                
            }
        }

        return View(parking);
}

然后我想从 'ParkingDto' class 调用 'parking' 在此处查看:

@using MVC.SmartParkingSystem.Models.ParkingDto;

但我得到这个错误:

The type or namespace name 'ParkingDto' does not exist in the namespace 'MVC.SmartParkingSystem.Models' (are you missing an assembly reference?)

解决方案资源管理器:

我用的是@model而不是@using,所以问题解决了:

@model SmartParkingSystem.Entity.ParkingDto;