このリンクを使用してアプリケーションを開発しています:
http://www.binaryintellect.net/articles/9a5fe277-6e7e-43e5-8408-a28ff5be7801.aspx
BasicDetails へのビューの生成中に、次のエラーが発生しました。
Unable to retrieve metadata for WebApplication.Models.BasicInfo
ここに私の接続文字列があります:
<add name="CompanyEntity" connectionString="metadata=res://*/Models.Employee.csdl|res://*/Models.Employee.ssdl|res://*/Models.Employee.msl;provider=System.Data.SqlClient;provider connection string="data source=myservername;initial catalog=Company;multipleactiveresultsets=True;application name=EntityFramework"" providerName="System.Data.EntityClient" /></connectionStrings>
このアプリケーションを MVC5 で作成しています。
私の BasicInfo クラス:
public class BasicInfo
{
public string EmpName { get; set; }
public string CompName { get; set; }
}
EmployeeController クラスの私の BasicInfo:
public ActionResult BasicInfo(BasicInfo Details, string BtnPrevious, string BtnNext)
{
if (BtnNext != null)
{
if (ModelState.IsValid)
{
Employee ObjEmp = GetEmployee();
ObjEmp.EmployeeName = Details.EmpName;
ObjEmp.CompanyName = Details.CompName;
return View("AddressInfo");
}
}
return View();
}