Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8016999
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T20:42:20+00:00 2026-06-04T20:42:20+00:00

I simplified the code a little while trying to debug: [HttpPost] public ActionResult Register(User

  • 0

I simplified the code a little while trying to debug:

[HttpPost]
    public ActionResult Register(User model)
    {
        DateTime bla = new DateTime(2012, 12, 12);
        try
        {
            User user = new User
            {
                gid = 1,
                cid = 1,
                firstName = model.firstName,
                lastName = model.lastName,
                email = model.email,
                username = model.username,
                password = model.password,
                creationDate = bla,
                active = 1
            };
            myContext.Users.AddObject(user);
            myContext.SaveChanges();

        }
        catch (Exception ex)
        {
            throw ex;
        }

        return View();               
    }

The values are transmited accordingly. Users table:

[id] [int] IDENTITY(1,1) NOT NULL,
[cid] [int] NULL,
[gid] [int] NULL,
[firstName] [nvarchar](100) NOT NULL,
[lastName] [nvarchar](100) NOT NULL,
[email] [nvarchar](max) NOT NULL,
[username] [nvarchar](100) NOT NULL,
[password] [nvarchar](100) NOT NULL,
[creationDate] [datetime] NOT NULL,
[active] [int] NOT NULL,

CONSTRAINT [PK_Users_3213E83F0AD2A005] PRIMARY KEY CLUSTERED

I deleted all the foreign keys to be sure that nothing affects it. I am qute certain that at a previous moment it was working, but now I can not figure where the issue is.
It crashes while performing the savechanges:

{"An error occurred while updating the entries. See the inner exception for details."}
{"The member with identity '' does not exist in the metadata collection.\r\nParameter name: identity"}
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-04T20:42:22+00:00Added an answer on June 4, 2026 at 8:42 pm

    The issue was reproducing because of a trigger that was on the users table. Removed it and the issue is not reproducing anymore.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Here is a simplified code example of what I'm trying to do: public class
Simplified example: [HttpGet] public ActionResult Report(DateTime? date) { if (!date.HasValue) { date = DateTime.Now;
(Simplified) code from a WordPress project: function fix_youtube_links ($content) { $append = '&w=480&rel=0'; $content
Following simplified code snippet: #include <QtGui> int main(int argc, char **argv) { QApplication app(argc,
This is a simplified code. I have a webservice (.asmx) as following: I store
Here are some (overly) simplified code example to describe my unit testing method. CompanyDataSet.xml
Here's a piece of simplified code: static Activity longLivedField; onCreate(...) { longLivedField = this;
I have a fairly simple Linq query (simplified code): dim x = From Product
Can function calls occur within a PDO transaction block? This is simplified code (using
This question is partly about delegates, and partly about generics. Given the simplified code:

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.