首页 \ 问答 \ 如何在MVC4中创建上下文类[关闭](How to create context class in MVC4 [closed])

如何在MVC4中创建上下文类[关闭](How to create context class in MVC4 [closed])

我有一个MVC4数据库第一个项目。 我建立了数据库连接,并为表格创建了所有的.cs文件。 上下文已创建,但创建控制器时不会显示在下拉列表中。 难道我做错了什么? 如果需要,将提供任何其他信息。


I have a MVC4 database first project. I have established database connection and all the .cs files are created for the tables. A context is created, but this does not show up in the dropdownlist while creating a controller. Am I doing something wrong? Any additional information will be provided if required.


原文:https://stackoverflow.com/questions/17880832
更新时间:2023-01-07 21:01

最满意答案

请改用sudo port py27-opengl

通常,对于与MacPorts python相关的端口,它所应用的Python版本以其名称编码: py25-py26-py27-py31-py32- 。 他们在Python 2.4之后开始这样做,因此py-通常是传统的Python 2.4版本。 还有其他端口使用变量来选择要链接的Python。 这些在端口描述中被调用,如下所示。 例如,要安装Python 2.7的boost ,你可以使用sudo port boost +python27


Use sudo port py27-opengl instead.

In general, with MacPorts python-related ports, the Python version to which it applies is encoded in its name: py25-, py26-, py27-, py31-, py32-. They started doing this after Python 2.4, so py- are generally the legacy Python 2.4 versions. There are other ports that use variants to select which Python to link with. These are called out in the port descriptions, like these. For example, to install boost for Python 2.7, you would use sudo port boost +python27.

相关问答

更多
  • 我记得它是像g++-mp-4.6这样的东西。 我相信设置环境变量CXX就足够了。 I remember it being something like g++-mp-4.6. I believe it's enough to set the environment variable CXX to that.
  • 使用port installed列出所有端口。 Use port installed to list all of your ports.
  • MacPorts在安装python模块时不会碰到系统python。 它确实为它自己的python版本安装了这些模块,默认是/opt/local/bin/python2.7 。 你可以使它成为在shell中使用sudo port select --set python python27键入python时运行的默认python。 MacPorts does not touch the system python when installing python modules. It does install th ...
  • 我发现了这个问题的解决方案,但不是.NET Core 第173期中更通用的解决方案。 简而言之,您需要将libcrypto.dylib和libssl.dylib的MacPorts版本链接到/usr/local/lib : sudo ln -s /opt/local/lib/libcrypto.1.0.0.dylib /usr/local/lib/libcrypto.1.0.0.dylib sudo ln -s /opt/local/lib/libssl.1.0.0.dylib /usr/local/lib/ ...
  • 第一个区别:OpenGL是一个规范,而不是一个库。 因此,比较PyOpenGL和OpenGL,就像比较蓝图和房子。 回答你的问题:Python是一种解释型语言,就像Java一样。 游戏引擎需要非常密集的计算,不仅适用于图形,还适用于物理学,人工智能,动画,加载3D文件等。对于优秀的图形来说,PyOpenGL可能就足够了,但对于所有CPU端代码来说,Python是不够的。 当然,这也取决于游戏引擎的“等级”:对于简单/学术游戏,Python可能会完美运行,但不要期待Cryengine具有它。 First di ...
  • 你的主要问题是glReadPixels接受左下角原点而pygame接受左上角。 首先,你应该总是保存你的pygame Surface (我将很快演示的原因)。 所以: window = pg.display.set_mode((500,500),pg.OPENGL) 现在您可以访问window.width和window.height 。 所以现在你的glReadPixels将获得适当的位置: color=glReadPixels(x,window.height-y,1,1,GL_RGB,GL_FLOAT) ...
  • 请改用sudo port py27-opengl 。 通常,对于与MacPorts python相关的端口,它所应用的Python版本以其名称编码: py25- , py26- , py27- , py31- , py32- 。 他们在Python 2.4之后开始这样做,因此py-通常是传统的Python 2.4版本。 还有其他端口使用变量来选择要链接的Python。 这些在端口描述中被调用,如下所示。 例如,要安装Python 2.7的boost ,你可以使用sudo port boost +python ...
  • MacPorts将其所有端口安装到/opt/local (或者您配置的任何前缀,但默认为/opt/local )。 它安装自己的Perl,Python等副本,以便MacPorts的安装是标准化的,并且为了避免冲突(苹果公司提供的一些程序,如Perl和Python,以及一些库的版本,往往远远落后于最新版本的那些工具)。 当你安装MacPorts时,它会自动将/opt/local/bin加到你的$PATH变量中(你可以通过编辑你的shell配置文件来改变它),所以如果你调用perl等,你会得到MacPorts版 ...
  • 更改 from OpenGL import * 至 from OpenGL.GL import * 但是,我赞成使用这种格式: import OpenGL.GL as GL import OpenGL.GLU as GLU import OpenGL.GLUT as GLUT window = 0 width, height = 500,400 def draw(): GL.glClear(GL.GL_COLOR_BUFFER_BIT |GL.GL_DEPTH_BUFFER_BIT) ...
  • 当pygame与opengl一起使用时,pygame将处理跨平台:窗口创建,键输入,声音输出,图像加载等等,但是pyOpenGL会进行实际渲染。 Pyglet还有跨平台窗口创建+ opengl: http ://www.pyglet.org/ 我不相信使用pygame与其他解决方案有很大的速度差异。 但不同之处在于你如何做事,这将产生最大的影响。 使用numpy vs not,重复调用昂贵的函数,例如:opengl的begin / end等。 When using pygame with opengl, p ...

相关文章

更多

最新问答

更多
  • 您如何使用git diff文件,并将其应用于同一存储库的副本的本地分支?(How do you take a git diff file, and apply it to a local branch that is a copy of the same repository?)
  • 将长浮点值剪切为2个小数点并复制到字符数组(Cut Long Float Value to 2 decimal points and copy to Character Array)
  • OctoberCMS侧边栏不呈现(OctoberCMS Sidebar not rendering)
  • 页面加载后对象是否有资格进行垃圾回收?(Are objects eligible for garbage collection after the page loads?)
  • codeigniter中的语言不能按预期工作(language in codeigniter doesn' t work as expected)
  • 在计算机拍照在哪里进入
  • 使用cin.get()从c ++中的输入流中丢弃不需要的字符(Using cin.get() to discard unwanted characters from the input stream in c++)
  • No for循环将在for循环中运行。(No for loop will run inside for loop. Testing for primes)
  • 单页应用程序:页面重新加载(Single Page Application: page reload)
  • 在循环中选择具有相似模式的列名称(Selecting Column Name With Similar Pattern in a Loop)
  • System.StackOverflow错误(System.StackOverflow error)
  • KnockoutJS未在嵌套模板上应用beforeRemove和afterAdd(KnockoutJS not applying beforeRemove and afterAdd on nested templates)
  • 散列包括方法和/或嵌套属性(Hash include methods and/or nested attributes)
  • android - 如何避免使用Samsung RFS文件系统延迟/冻结?(android - how to avoid lag/freezes with Samsung RFS filesystem?)
  • TensorFlow:基于索引列表创建新张量(TensorFlow: Create a new tensor based on list of indices)
  • 企业安全培训的各项内容
  • 错误:RPC失败;(error: RPC failed; curl transfer closed with outstanding read data remaining)
  • C#类名中允许哪些字符?(What characters are allowed in C# class name?)
  • NumPy:将int64值存储在np.array中并使用dtype float64并将其转换回整数是否安全?(NumPy: Is it safe to store an int64 value in an np.array with dtype float64 and later convert it back to integer?)
  • 注销后如何隐藏导航portlet?(How to hide navigation portlet after logout?)
  • 将多个行和可变行移动到列(moving multiple and variable rows to columns)
  • 提交表单时忽略基础href,而不使用Javascript(ignore base href when submitting form, without using Javascript)
  • 对setOnInfoWindowClickListener的意图(Intent on setOnInfoWindowClickListener)
  • Angular $资源不会改变方法(Angular $resource doesn't change method)
  • 在Angular 5中不是一个函数(is not a function in Angular 5)
  • 如何配置Composite C1以将.m和桌面作为同一站点提供服务(How to configure Composite C1 to serve .m and desktop as the same site)
  • 不适用:悬停在悬停时:在元素之前[复制](Don't apply :hover when hovering on :before element [duplicate])
  • 常见的python rpc和cli接口(Common python rpc and cli interface)
  • Mysql DB单个字段匹配多个其他字段(Mysql DB single field matching to multiple other fields)
  • 产品页面上的Magento Up出售对齐问题(Magento Up sell alignment issue on the products page)