Redian新闻
>
Linq to entity framework: what happens if i modified DB schema in SSMS ?
avatar
Linq to entity framework: what happens if i modified DB schema in SSMS ?# DotNet - 窗口里的风景
w*s
1
1. say my c# code uses Linq to entity framework.
2. Now in SQL Server Management Studio, i added another column to a table
how's my c# project pick up this change pls ?
i didn't see a "refresh data source" ...
avatar
x*n
2
If you use EF tool to generate the mapping, just right click the design
window and choose update from the context menu. If you use poco and code
first, do mapping by your self.
avatar
w*s
3
大牛,
0. in SQL management studio 2012, added 1 more column for a table.
1. In VS C# 2012 project, in Model Browser, right click and do "update ...",
i got this, see attachment.
2. Then i go back to SQL management studio, i can attach file database.
3. Then i detach it from SQL, reboot.
4. Try again in VS C# 2012, same error.
Any thoughts ?

【在 x**n 的大作中提到】
: If you use EF tool to generate the mapping, just right click the design
: window and choose update from the context menu. If you use poco and code
: first, do mapping by your self.

avatar
c*e
4
有時候,我用最原始的办法。把原来的那个什么edmx文件删除掉,重新生成一個edmx文
件,就好了。

",

【在 w*s 的大作中提到】
: 大牛,
: 0. in SQL management studio 2012, added 1 more column for a table.
: 1. In VS C# 2012 project, in Model Browser, right click and do "update ...",
: i got this, see attachment.
: 2. Then i go back to SQL management studio, i can attach file database.
: 3. Then i detach it from SQL, reboot.
: 4. Try again in VS C# 2012, same error.
: Any thoughts ?

avatar
H*g
5
right click and select Update... In the pop up window, select the middle one
, called Refresh something...
老兄,你用啥操作系统啊。。。为嘛你这个VS 2012整天出现奇怪的问题。。。

",

【在 w*s 的大作中提到】
: 大牛,
: 0. in SQL management studio 2012, added 1 more column for a table.
: 1. In VS C# 2012 project, in Model Browser, right click and do "update ...",
: i got this, see attachment.
: 2. Then i go back to SQL management studio, i can attach file database.
: 3. Then i detach it from SQL, reboot.
: 4. Try again in VS C# 2012, same error.
: Any thoughts ?

avatar
w*s
6
yes, i clicked the "Update model from database", but didn't see the "refresh
..."
i'm using 64-bit win 7, all standard stuff ...

one

【在 H*******g 的大作中提到】
: right click and select Update... In the pop up window, select the middle one
: , called Refresh something...
: 老兄,你用啥操作系统啊。。。为嘛你这个VS 2012整天出现奇怪的问题。。。
:
: ",

avatar
H*g
7
EXPRESS的VISUAL STUDIO?

refresh

【在 w*s 的大作中提到】
: yes, i clicked the "Update model from database", but didn't see the "refresh
: ..."
: i'm using 64-bit win 7, all standard stuff ...
:
: one

avatar
w*s
9
ok, i thought i detached the database from mssms, but i didn't.
after i detach it, not it's updated.
don't understand why VS cannot spit out an error message ...
thanks brother.

one

【在 H*******g 的大作中提到】
: right click and select Update... In the pop up window, select the middle one
: , called Refresh something...
: 老兄,你用啥操作系统啊。。。为嘛你这个VS 2012整天出现奇怪的问题。。。
:
: ",

avatar
W*n
10
你那个错误信息里说的是login failed. 而且你用的是integrated security,检查你数
据库里的user和login没?
相关阅读
logo
联系我们隐私协议©2024 redian.news
Redian新闻
Redian.news刊载任何文章,不代表同意其说法或描述,仅为提供更多信息,也不构成任何建议。文章信息的合法性及真实性由其作者负责,与Redian.news及其运营公司无关。欢迎投稿,如发现稿件侵权,或作者不愿在本网发表文章,请版权拥有者通知本网处理。