Click here to Skip to main content
15,907,395 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
I am trying to insert record into table using entity framework. I Know how to do it and i have done but i modified the database by adding a new table "PasswordRecovery" and then i update my .edmx file and then i try to insert the record into that table


C#
PasswordRecovery OPasswordRecovery = new PasswordRecovery
                {
                    userId = user.Id,
                    url = token,
                    requestDateTime = DateTime.Now,
                    isRecoverd = false
                };
                context.PasswordRecoveries.Add(OPasswordRecovery);
                context.SaveChanges();



But the Exception "Invalid object name 'dbo.PasswordRecoveries"
Posted

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900