entity-framework-6

What database systems are fully supported by Entity Framework 6 and/or 7?

白昼怎懂夜的黑 提交于 2019-12-01 05:26:00
Which database systems (relational or NoSql) are supported by Entity Framework 6 and/or 7? The Entity Framework documentation has a long list (right hand side) of 3rd party providers. The ones listed today are: MySQL Connector/NET System.Data.SQLite Oracle Data Provider for .NET VistaDB Devart cdata OpenLink Software IBM Sybase SQL Anywhere Sybase Adaptive Server Enterprise Phoenix Software Solutions Synergex Firebird Npgsql NuoDB Ritmo for IBM i (DB2) EF7 is harder to find info for, but here are some links that may help: http://blogs.msdn.com/b/adonet/archive/2014/05/19/ef7-new-platforms-new

Visual Studio Component Cache Out of Date

橙三吉。 提交于 2019-12-01 05:10:58
问题 Almost every time I try to run the update-database command for EF migrations, I get the following error in Visual Studio 2015: Exception calling "GetService" with "1" argument(s): "Exception calling "Invoke" with "2" argument(s): "The Visual Studio component cache is out of date. Please restart Visual Studio. The Visual Studio component cache is out of date. Please restart Visual Studio."" At D:\Dev\Project\packages\EntityFramework.6.1.3\tools\EntityFramework.psm1:1004 char:5 +

Entity Framework Seed method exception

有些话、适合烂在心里 提交于 2019-12-01 05:06:07
问题 I am using Entity Framework 6 with an MVC5 webapi2 project against an Oracle database. I am trying to add some ApplicationRoles in the Seed method, but when I execute update-database I get this exception: Running Seed method. System.Runtime.Serialization.SerializationException: Type is not resolved for member 'Oracle.ManagedDataAccess.Client.OracleException,Oracle.ManagedDataAccess, Version=4.121.2.0, Culture=neutral, PublicKeyToken=89b483f429c47342'. at System.AppDomain.DoCallBack

DB default value ignored when creating Entity Framework model

ぐ巨炮叔叔 提交于 2019-12-01 04:48:04
问题 Assuming I have the following table in my DB: CREATE TABLE [dbo].[Test] ( [Id] INT IDENTITY (1, 1) NOT NULL, [Active] BIT DEFAULT ((1)) NOT NULL, ) When creating an EF model from this DB, the mapping for the Active bit column , which is mapped to a Boolean column, has no default value (see property "Default Value): Why does Entity Framework behave that way? Why doesn't the default value that is defined in the database automatically be applied in the model when the model gets created? The DB

Resolving 'No key Defined' errors while using OnModelCreating with ApplicationDbContext?

瘦欲@ 提交于 2019-12-01 04:44:36
I've been trying to create navigation properties for my collection types and I found this example of how one person accomplished it using OnModelCreating. I gave it a try in my MVC 5 application and I recieved this error when trying to update my database: One or more validation errors were detected during model generation: BlogEngine.Models.IdentityUserLogin: : EntityType 'IdentityUserLogin' has no key defined. Define the key for this EntityType. BlogEngine.Models.IdentityUserRole: : EntityType 'IdentityUserRole' has no key defined. Define the key for this EntityType. IdentityUserLogins:

What database systems are fully supported by Entity Framework 6 and/or 7?

青春壹個敷衍的年華 提交于 2019-12-01 04:40:05
问题 Which database systems (relational or NoSql) are supported by Entity Framework 6 and/or 7? 回答1: The Entity Framework documentation has a long list (right hand side) of 3rd party providers. The ones listed today are: MySQL Connector/NET System.Data.SQLite Oracle Data Provider for .NET VistaDB Devart cdata OpenLink Software IBM Sybase SQL Anywhere Sybase Adaptive Server Enterprise Phoenix Software Solutions Synergex Firebird Npgsql NuoDB Ritmo for IBM i (DB2) EF7 is harder to find info for, but

How do I get UWP Uninstall to remove database completely?

走远了吗. 提交于 2019-12-01 03:58:54
问题 I have managed to get an XAF application into the Windows Store via the Desktop Bridge. When a user installs my software from the Windows Store and then chooses to uninstall, I want them to have the option to completely uninstall the software including the database. So that they won't have any problem should they later decide to re-install? Currently, the UWP uninstall does not give an option to delete the database ( or even explain how to delete it ) Thus the user may be tempted to delete

Razor Syntax gives errors in View before compiling (No intellisense)

◇◆丶佛笑我妖孽 提交于 2019-12-01 03:44:57
I was going through the list of NuGet Packages and I was updating everything things like bootstrap, jQuery, etc. but while I was doing that, I unthinkingly updated Microsoft.Owin and another package (might have been EF or something else) and it was a major version update...woops. I had to jump through hoops by deleting my project, getting an older version from source control and getting everything back to the right versions. Everything is back to normal and I have one last issue. Razor Syntax. When I open up any of my views...anywhere in the project, I get this: Notice how anything using Razor

Entity Framework - ridiculous Query, casting smallint to int for comparison [duplicate]

梦想的初衷 提交于 2019-12-01 03:36:20
This question already has an answer here: Generated query for tinyint column introduces a CAST to int 9 answers Out of ideas here. I have a simple table that is model first mapped with Entity Framework and I get the following SQL generated: (@p__linq__0 int,@p__linq__1 int)SELECT [Extent1].[BucketRef] AS [BucketRef], [Extent1].[VariantNo] AS [VariantNo], [Extent1].[SliceNo] AS [SliceNo], [Extent1].[TradeNo] AS [TradeNo], [Extent1].[TradeBegin] AS [TradeBegin], [Extent1].[TradeEnd] AS [TradeEnd], FROM [simstg].[Trade] AS [Extent1] WHERE ((( CAST( [Extent1].[BucketRef] AS int) = @p__linq__0) AND

How to add an EF6 Association to a Candidate Key / Unique Key which is not the Primary Key?

此生再无相见时 提交于 2019-12-01 03:22:16
Using Schema First , I have a database structure, as so ExternalDataItems --- edataitem_id PK -- surrogate auto-increment - NOT for FK relation here datahash UX -- Candidate Key / Unique Index (binary(20)) ExternalMaps --- emap_id PK ext_datahash FK on ExternalDataItems.datahash - NOT referencing the surrogate PK and after generating the SSDL/CSDL 1 has this <Association Name="FK_ExtMaps_ExtDataItems"> <End Multiplicity="1" Role="ExternalDataItems" Type="Store.ExternalDataItems" /> <End Multiplicity="*" Role="ExternalMaps" Type="Store.ExternalMaps" /> <ReferentialConstraint> <!-- error on this