[英]Unable to load the specified metadata resource MVC 4
this is my error when I'm inserting a record to database using MVC 4 and entity framework. 当我使用MVC 4和实体框架将记录插入数据库时,这是我的错误。
this is my codes: 这是我的代码:
[HttpPost]
public ActionResult AddUser(Users u)
{
SystemUser su = new SystemUser()
{
Username = u.Username,
Password = u.Password,
FirstName = u.FirstName,
LastName = u.LastName,
MiddleName = u.MiddleName,
TerminalAccess = Convert.ToByte(u.TerminalAccess),
MPassAccess = u.MPassAccess,
CreationDate = u.DateCreation,
ApplicationName = u.ApplicationName,
Email = u.Email,
IsApproved = u.isApproved
};
db.SystemUsers.Add(su);
db.SaveChanges();
return View();
}
is there problem with my code or just the entity itself have a problem? 我的代码有问题吗?还是实体本身有问题? please help. 请帮忙。 thanks in advance 提前致谢
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.