【问题标题】:Visual studio update model from data base IssueVisual Studio 从数据库更新模型问题
【发布时间】:2017-06-25 15:39:27
【问题描述】:
i was facing a issue  while trying to add a new Store Procedure from database .  update model from data base is showing extra line changes in all Store Procedure and showing in "Include Changes " in Visual studio . I am using Visual Studio 2015 , trying to add newly created store Procedure in Entity . any help will be appreciable ,it making me in trouble a lot .[![enter image description here][1]][1]

从模型更新后出现此屏幕。 这个屏幕在比较变化后得到,

请查看我在运行“git config -l --show-origin”后得到的设置

【问题讨论】:

  • 我已经放弃了这些步骤:- a。创建存储过程。湾。尝试工具选项“从数据库更新模型”。 C。检查更新的存储过程。 d。它显示了 Visual Studio 中的所有存储过程“包含更改”部分。 e.我试图添加单个存储过程,但现在显示全部更改。 F。当我比较更改时,每个 Store Procedure 只显示一个额外的行。如果需要更多说明,请告诉我。
  • 你检查过你的 git config -l 是否有任何 core.autocrlf 为真?
  • 是的,那里一切都很好。一个core.autocrlf:true,低于第二个core.autocrlf:false,所以我认为最后一个覆盖第一个。我怎么能看到你完成设置选项。
  • 正如我所说:git config -l --show-origin
  • core.symlinks=false core.autocrlf=true core.fscache=true color.diff=auto color.status=auto color.branch=auto color.interactive=true help.format=html http. sslcainfo=C:/Program Files (x86)/Git/mingw32/ssl/certs/ca-bundle.crt diff.astextplain.textconv=astextplain rebase.autosquash=true filter.lfs.clean=git-lfs clean -- %f filter.lfs.smudge=git-lfs 涂抹 -- %f filter.lfs.required=true

标签: c# git entity-framework visual-studio-2015 ado.net


【解决方案1】:

我在尝试从数据库添加新的存储过程时遇到问题:
从数据库更新模型显示所有存储过程中的额外行更改,并显示在 Visual Studio 的“包含更改”中。

那些额外的行只是在方法声明之间添加的空行。
它们与 core.autocrlf 和 eol(行尾)字符无关。

如果您添加/提交这些更改,下次更新模型时,您应该不会再次看到那些额外的行(因为它们已经存在了)。

所以这不是一个实际问题,只是默认情况下 Visual Studio 格式化该文件的方式。如图所示,您可以继续进行这些更改。

【讨论】:

  • 我明白了你的意思,但我不能提交这些更改,因为它已经在我的 Origin 存储库分支上,下一次,我必须从同一个分支结帐,从我现在采取的地方,这些都是更改,现在显示,它们已经在我的 Checkout 分支上。在这里,我尝试添加一个存储过程,所以为什么,它在所有文件中显示更改。这其实让我很担心。如果我添加/提交这些更改,我的客户将取消该拉取请求并且永远不会合并这些更改,因为这些更改不应该存在。
  • 我应该怎么做,请建议
  • @Vivek 等一下,我要去上班了 ;) 我很快就会在那里发表评论。
  • “那么为什么,它在所有文件中显示更改”:可能是因为您有一个 Visual Studio“源格式”设置,它要求在方法之间有一个空行(在格式上完成:stackoverflow.com/a/41533526/6309 )。也可以更清晰(stackoverflow.com/a/24861297/6309)。再次检查您的设置:stackoverflow.com/a/32459206/6309
  • 我认为我们正在接近解决我的问题,这对我应该有用,我会通过这个,。 stackoverflow.com/questions/32229830/…
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2015-07-07
  • 1970-01-01
  • 1970-01-01
  • 2020-09-18
相关资源
最近更新 更多