如何添加一个“使用”声明的System.Data.Entity的命名空间 [英] How to add a “using” statement to the System.Data.Entity namespace
问题描述
我是新来的一般Visual Studio和C#。我下面的教程努力学习语言(<一个href=\"http://weblogs.asp.net/scottgu/archive/2011/05/05/ef-$c$c-first-and-data-scaffolding-with-the-asp-net-mvc-3-tools-update.aspx\"相对=nofollow>教程这里)。
I am new to Visual Studio and C# in general. I'm following a tutorial trying to learn the language (tutorial here).
其中的一个步骤就是是在类文件的顶部添加一个使用声明的System.Data.Entity的命名空间(以引用的DbContext和DbSet班)。这可以在第3步中找到。
One of the steps is to add a "using" statement to the System.Data.Entity namespace at the top of the class file (in order to reference the DbContext and DbSet classes). This can be found under step 3.
我希望有人可以帮我这个部分。我搜索在这里和谷歌的答案,但因为我是新来的语言我似乎无法找到正确的答案。任何帮助将大大AP preciated!
I'm hoping someone can help me out with this section. I've searched on here and Google for an answer, but since I'm new to the language I can't seem to find the correct answer. Any help would be greatly appreciated!
推荐答案
在你的文件的顶部应该有几行,每开始使用
,之后命名空间关键字。
At the top of your file there should be couple lines, each starting with using
and namespace after that keyword.
添加另一个那里,在教程中提到的命名空间:
Add another one there, to the namespace mentioned in your tutorial:
using System.Data.Entity;
您可以用找到更多信息
MSDN上:的 使用
指令(C#参考)
You can find more information about using
on MSDN: using
Directive (C# Reference)
这篇关于如何添加一个“使用”声明的System.Data.Entity的命名空间的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!