Код не работает должным образом
The mapping of CLR type to EDM type is ambiguous because multiple CLR types match the EDM type 'UserProfile'. Previously found CLR type 'javascript.UserProfile', newly found CLR type 'javascript.Models.UserProfile'
What I have tried:
public ActionResult Login(UserProfile objUser)
{
if (ModelState.IsValid)
{
using (DB_Entities db = new DB_Entities())
{
var obj = db.UserProfiles.Where(a => a.UserName.Equals(objUser.UserName) && a.Password.Equals(objUser.Password)).FirstOrDefault();
if (obj != null)
{
Session["UserID"] = obj.UserId.ToString();
Session["UserName"] = obj.UserName.ToString();
return RedirectToAction("UserDashBoard");
}
}
}
return View(objUser);
}