简体   繁体   中英

Entity Framework Not Refreshing Correctly

Hey I have a problem with entity framework and was wondering has anyone else encountered this problem. I have edited my stored procedure to now include the course.code column and also group by it. However the problem now is when I try update the model from database I still get no confirmation that is there. When I look at the code there is still no get/set method for this new value. I am correct in thinking entity framework should automatically generate this code for me?

Anyways I have tried using the custom tool on both of the .tt files with no luck. I have tried updating model from database. I have tried deleting the resultset.cs associated and finally I tried deleting the entity framework folder and restoring again from svn but still no luck. If anyone out there has encountered a similar problem and figured it out I would be forever in your debth. I am trying to add this new available field into a telerick report and so far I am having no luck. I have included the part of the stored procedure I have altered.Thanks very much in advance.

SELECT s.number as studentNumber, 
        s.last_name as studentLastName, 
        s.first_name as studentFirstName, 
        replace(h.name,'/',char(160) + '/' + char(160)) as homeroomName, 
        c.name as courseName,
        **c.Code as courseCode,**
        ISNULL(o.priceaspurchased, i.price) as Total, 

Ok I got it....... After spending multiple hours searching the internet I found it. You have to go into your .edmx file - right click - model browser - expand scsmodel and then functionimports - find your stored procedures name - double click it - then click get column information - confirm your new column is appearing in the grid that appears - click update and hey presto! :)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM