I have a problem with my C# project in
Visual Studio 2017. When I'm adding a new column to my SQL server 2014 table I can't find it in VS 2017 data grid and other you can check my 3 picture:


My code in Student.cs class
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- namespace CURD
- {
- public class Student
- {
- public int StudentID { get; set; }
- public string FullName { get; set; }
- public string mcbRozetavalod { get; set; }
- public string mcbMahetavalod { get; set; }
- public string mcbTarikheTavalod { get; set; }
- public string Email { get; set; }
- public string Address { get; set; }
- public string ImageUrl { get; set; }
- public bool Gender { get; set;
- }
- }
- }
And my code in EntityState.cs class
- using System;
- using System.Collections.Generic;
- using System.Linq; using System.Text;
- using System.Threading.Tasks;
- namespace CURD
- {
- public enum EntityState
- {
- Unchanged,
- Added,
- Changed,
- Deleted
- }
- }
2 Replies
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Bhairab DuttPosted May 30, 2018, 9:27 AM
Everytime if you update the stored procedute , You have to update the entity so If you are using edmx by below steps:
1- First you will Open the edmx by double click.
2- Right click on page select update from database option .
4- Select your tables and strored procedure and click on OK.
Please read and follow the above steps .
Hope its help you.
Thanks.
rajendra singhPosted May 30, 2018, 2:36 AM