I've just changed to the new ASP.NET 5 platform. I use visual studio code as my default IDE, and DNX for execution. .NET Core is now by default but I need to switch to .NET Framework always I want to reference the ...System.Data.Entity... namespace or the...
I have a .NET core class library from which I want to reference Entity Framework 6.1.3. Here is my project.json:...{
"version": "1.0.0-*",
"dependencies": {
"NETStandard.Library": "1.5.0-rc2-24027",
"EntityFramework": "6.1.3"
},
"framew...
I have a .NET Core 1.0 class library which targets .NET 4.6.1 and references the .NET Standard Library 1.6.0 and Identity Framework 2.2.1...project.json...{
"version": "1.0.0-*",
"dependencies": {
"Microsoft.AspNet.Identity.EntityFramewor...
I've got a DAL with EntityFramework 6 running in .NET Framework 4.6.1 as a project. Works fine in solutions with other .NET Framework projects. Now am I going to use same DAL project referenced to my ASP.NET Core WebApi (using .NET Framework 4.6.1) and it...
My application which is being ported to .NET core will use the new EF Core with SQLite. I want to automatically create the database and table structures when the app is first run. According to the EF core documentation this is done using manual commands ....
I am new to EF Core 1.0. Getting below error when I run below command during DB migration...Command... migrations add ApplicationUserIsActive -c ApplicationDbContext
...Error:...System.InvalidOperationException: No database provider has been
configured ...
I have a developer that is getting "Build failed." when running add-migration in a .NET Core EF project, with no explanation of why the build failed. How do you troubleshoot this error?...This is what he gets in the Package Manager Console:...Additional i...
I'm trying to launch ....Net Core 2.0... application on ...Ubuntu 17.04.... I developed it on Windows 10 before and it works well. The problem is that when I run ...dotnet ef database update... I get the next exception:...System.PlatformNotSupportedExcept...
I want to run a SQLite database in development and a SQLServer Express database in production....We are using code first with database migrations....How do I inject a different dbcontext in each environment?...How do I run migrations against a specific da...
What is the best approach to update a database table data in entity frame work core ?...Retrive the table row , do the changes and save...Use Key word ...Update... in db context and handle exception for item not exist ...What are the improved feature we c...
I have the following code in a ...csproj... file:...<TargetFramework>netcoreapp1.0</TargetFramework>...In the NuGet package manager, it says that I have ...Microsoft.NETCore.App version 1.0.5...Now lets say I have the following code in the same ...csproj....
I'm new to EF and am trying to create a simple test solution using VS 2017, .NET Core 2.0 and EF 2.0 but I can't get ...add-migration... to create the migrations folder and the initial migration....I have created a solution called ...Driver... with two .N...
I'm using generic repository pattern in asp.net core 2.0 which can not dispose repository object, when I am going to update the entry its updated for one time successfully but when I am trying to update for more then once it throws the following exception...
I am working on .NET Core application; Entity Framework 6 ...I need to add child object which is collection is same parent object in LINQ query not lambda expression...User - parent entity...public class UserDataModel
{
public UserDataModel()
{
...
I have a database that I created using ...EF6.... I have a VS project (library) that includes only my models and ...DbContext.... Whenever I need to use my database I just reference that library DLL....I have a few questions about that:...What happens if ...
I have a ...dotnet core 2.0... backend and ...angular2+... frontend application. ...I would like to get a list of participants where ...event... field is equal to "baseline" (comes from dropdown menu in the HTML) in the schedules class. I have a ...one-to...
If I run ...dotnet ef add testmigration...I get this warning: ...The EF Core tools version '2.1.0-rtm-30799' is older than that of the runtime '2.1.1-rtm-30846'. Update the tools for the latest features and bug fixes....So I checked my csproj file:...<Ite...
is that possible to automate these mappings with reflection?...i have a simple column mapping :...var columnsMap = new Dictionary<string, Expression<Func<Industry, object>>>
{
["id"] = v => v.Id,
["name"] = v => v.Name,
["isActive"] = v => v.I...
I have a Combobox with different conditions like "=", ">=", "<=" ... and dates.
I would like to use the conditions in strings to compare dates. It's possible to convert the operators in string format to logical operators to compare dates on linq query to ...
I create a project in which I would like to connect to an SQLite provider for testing purposes, and use PostgreSQL on production....protected override void OnConfiguring(DbContextOptionsBuilder opt)
{
#if DEBUG
opt.UseSqlite("Data Source=blogging.db");...