ado.net-entity-data-model

Missing “Ado.Net Entity Data Model” on Visual Studio 2013

南楼画角 提交于 2019-11-26 18:17:38
问题 I have created new web project but I can't find ADO.net Entity DAta Model to add it. How to fix it or Install it ? 回答1: Go to "C:\ProgramData\Package Cache" and search for "EFTools.msi". You should find two files, just install the most recent one (it should be about 960KB). This fixed the problem for me. 回答2: i have the same problem, but there is no "EFTools.msi" in "C:\ProgramData\Package Cache" for me... UPDATE : i download and install "Entity Framework 6 Tools for Visual Studio 2012 & 2013

Entity framework: StoreGeneratedPattern=“Computed” property

僤鯓⒐⒋嵵緔 提交于 2019-11-26 16:54:55
问题 I have a DateTime property. I need this property's default value to be DateTime.Now . And then I found out that you can specify an attribute StoreGeneratedPattern="Computed" and set it to (getdate()) in SQL. This works successfully. But I can't change this property in code. Sometimes I need to change this property to any DateTime value. But my changes are not saved. 回答1: Setting this property to Computed is telling EF that you cannot set the value directly. How could you? This property exists

Metadata file not found - Data.Entity.Model

五迷三道 提交于 2019-11-26 16:50:25
问题 Anyone having similar problem, while creating webservices? Compiling transformation: Metadata file 'D:\Program Files\VS2013\Common7\Tools..\IDE\Microsoft.Data.Entity.Design.dll' could not be found D:\PROJEKTY\apki\ws2\WS\WS\DataModel.tt I tried adding data model again, restarting VS, cleaning and building solution, creating new project, deleting and adding reference, installing the newest version. I think that any solution found on internet does not work for me. Any suggestions? I think of

Columns of two related database tables in one ASP.NET GridView with EntityDataSource

微笑、不失礼 提交于 2019-11-26 16:15:32
问题 I have two SQL Server tables with Primary Keys (PK) and a Foreign Key (FK) linking the two tables: 1) Table "Order" OrderID, int, PK AddressID, int, FK ... 2) Table "Address" AddressID, int, PK City, nvarchar(50) ... Then I've created an (ADO.NET) Entity Data Model out of those two tables. Now on my (ASP.NET) webpage I put a GridView with an EntityDataSource. In my GridView I want to display two columns: OrderID City (belonging to that order and linked by the AddressID-key) How can I do that?

How to create “embedded” SQL 2008 database file if it doesn't exist?

a 夏天 提交于 2019-11-26 10:03:43
问题 I\'ve created a database application using C#, ADO.Net and an embedded MS SQL 2008 database file (that attaches to MS SQL 2008 Express) which I created in Server Management Studio. Can someone point me to a resource that describes how I can programmatically create the database file if it is missing (like right after my application is installed)? 回答1: If it were me (when it is me...): You don't particularly want to be trying to make database files work by copying them and attaching them -

Can't Create Entity Data Model - using MySql and EF6

若如初见. 提交于 2019-11-26 09:26:13
问题 I\'m trying to add an edmx Entity model to my C#/Web Project in Visual Studio 2013. My problem is that the file is not created. I do the following steps: Give the item a name Choose \'EF Designer from database\' Choose the connection from the drop down (localhost) that already tested successfully connecting to MySQL databse The \"Save connection settings in webc.config as\" option is checked I click \'Next\' AND the window disappeared and I get back to the code window No edmx file is created.