how to call data model using mvc

Apr 12 2015 1:47 AM

Cannot insert the value NULL into column 'UserName', table 'CurruptionControlInformationSystem.dbo.Login'; column does not allow nulls. INSERT fails.
Transaction count after EXECUTE indicates a mismatching number of BEGIN and COMMIT statements. Previous count = 1, current count = 0.
The statement has been terminated.


Line 53:             { Line 54:                 db.Registrations.Add(registration); Line 55:                 await db.SaveChangesAsync(); Line 56:                 return RedirectToAction("Index"); Line 57:             }

Answers (2)