0

this is my error when I'm inserting a record to database using MVC 4 and entity framework.

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

puretppc
  • 3,232
  • 8
  • 38
  • 65
  • possible duplicate of [MetadataException: Unable to load the specified metadata resource](http://stackoverflow.com/questions/689355/metadataexception-unable-to-load-the-specified-metadata-resource) – David L Jan 30 '14 at 05:03

1 Answers1

0

This means that the application is unable to load the EDMX.

Use this Link

Community
  • 1
  • 1
Harshit Tailor
  • 3,261
  • 6
  • 27
  • 40