Here is the error i get when i click on submit on my form to add a new user. I tried to set IDENTITY to ON trough query on User Table and it didn't help. I don't know how can i set it on and off when i'm not inserting data myself. Any suggestions? 

![](https://i.stack.imgur.com/YpNCh.png)
Here is my controller: 

```
    [HttpPost]
    [ValidateAntiForgeryToken]
    public ActionResult Register(User U)
    {
        if (ModelState.IsValid)
        {
            using (SomeEntities dc = new SomeEntities ())
            {
                //you should check duplicate registration here 
                dc.Users.Add(U);
                dc.SaveChanges();
                ModelState.Clear();
                U = null;
                ViewBag.Message = "Successfully Registration Done";
            }
        }
        return View(U);
    }

```

Here Is my User Model: 

```
public partial class User
{
    public User()
    {
        this.Posts = new HashSet<Post>();
        this.PostFeedbacks = new HashSet<PostFeedback>();
        this.ProjectUsers = new HashSet<ProjectUser>();
        this.UserWithdraws = new HashSet<UserWithdraw>();
    }

    public decimal user_id { get; set; }

    [Required(ErrorMessage = "Please provide username", AllowEmptyStrings = false)]
    public string user_name { get; set; }

    [Required(ErrorMessage="Please provide Password", AllowEmptyStrings=false)]
    [DataType(System.ComponentModel.DataAnnotations.DataType.Password)]
    [StringLength(50, MinimumLength = 8, ErrorMessage = "Password must be 8 char long.")]
    public string user_pass { get; set; }

    [Compare("user_pass", ErrorMessage = "Confirm password dose not match.")]
    [DataType(System.ComponentModel.DataAnnotations.DataType.Password)]
    public string confirm_user_pass { get; set; }

    [Required(ErrorMessage = "Please provide full name", AllowEmptyStrings = false)]
    public string full_name { get; set; }

```