zzz projects Entity Framework Core EF Core
Home Articles Knowledge Base Online Examples
  • Home
  • Articles
  • Knowledge Base
  • Online Examples

Entity Framework Core - Knowledge Base (KB)

16 results in tag: asp.net-web-api2

Entity Framework / WebApi 2 permission check implementation

I'm writing a simple "Todo App" using ASP.NET WebApi 2 and Entity Framework 6.1.0-alpha1. My aim is to restrict access, each user shall only view/edit their own Todos....Example:... // GET api/Todo/5 [ResponseType(typeof(Todo))] public async Ta...
asp.net-web-api asp.net-web-api2 c# entity-framework entity-framework-6
asked by Adam Szabo

Add/Update list in database using Entity framework 6

I have three tables QuestionBank,Question and Answer. " QuestionBank " will have list of Question and " Question " will have list of " Answer "....QUESTIONBANK :- ...public class QuestionBank { public int id { get; set; } public string Text { get; set; } ...
asp.net-mvc-5 asp.net-web-api2 entity-framework entity-framework-6
asked by Rushee

ASP.NET Web Api 2 / EF6 first call initialization performance

The first call to our API is always extremely slow. For example, below demonstrates the CPU usage and time it takes for the first call to complete:...The first call can take up to ...30 seconds... and eats almost 100% CPU. Call 2 and 3 take 200ms (as th...
asp.net-web-api2 entity-framework entity-framework-6 iis iis-8
asked by Dave New

How do I add properties to a Web API Response that I do not store in my DB?

I am building a C# Web API using Entity Framework 6.0. I have the simplest User Class with 3 properties that I persist on SQL into a User Table with 3 corresponding columns where UserID is its the Primary Key....public partial class User { public str...
asp.net-web-api asp.net-web-api2 c# entity-framework entity-framework-6
asked by Aladdin Nassar

Entity Framework Core DbContext and Dependency Injection

I'm building a service application using Web API, .Net Core and EntityFramework Core....For configuring options in my DbContext I'm using these lines in "ConfigureServices" method in Startup.cs... var connection = @"Server=ISSQLDEV;Database=EventManagemen...
asp.net-web-api2 dbcontext dependency-injection entity-framework entity-framework-core
asked by Pouyan

Entity Framework Core 1.0.0 Disable Eager/Lazy Loading

Can't seem to find any mention of this for EF Core. I've found examples to disable lazy loading in prior EF versions. I have an asp.net core, MVC6, Web Api, and AngularJS site I'm working on. ...In the app, I have a table Members and a table MemberStateAc...
asp.net-core asp.net-web-api2 entity-framework-core json lazy-loading
asked by T. Lee

Entity Framework default value for null properties on select

I am possibly looking at moving from nHibernate for my ORM to entity framework and I am running into a small issue if the database is has a null value, but the entity property is not nullable. nHibernate will just set the default value and move on and wi...
asp.net-web-api2 c# entity-framework entity-framework-6
asked by Rodney Pannell

How can I create a database and tables at runtime using Entity Framework 6?

I have an application that is using Entity Framework 6 (database-first). My database already exists, but I would like to be able to run my application in a new environment and have the code create the database and tables if they do not already exist. ...
asp.net-web-api2 c# entity-framework entity-framework-6 sql-server
asked by cortez

How to Update Migration DB Entity Framework in Server Production

I have created a web-based application using Asp.Net MVC and Entity Framework 6. Currently the app has been installed on the production server my client. A few weeks ago, my client wants additional modules of applications that are already running today. C...
asp.net-mvc asp.net-web-api2 entity-framework entity-framework-6
asked by Bintang Chester

System.InvalidOperationException in EF core when trying to update

Problem...I am creating a web app in asp.net core with ef core using with Repository pattern. Ii am trying to insert an entity it works fine when i trying to check whether it is already exist in db or then if yes than update the same entity in same api it...
asp.net-core asp.net-web-api2 entity-framework-core repository-pattern
asked by Malik Kashmiri

How do you load an existing data project in EF 6.2 with database first methodology into a Web API Core2 Controller?

So I have an EF application that is working great but it is thick client and I wanted to go service based and use Azure and MS's Core 2 framework. I go to build the Web API out of the box. Test it works, it does great. Now let's add a reference to my D...
asp.net-core-2.0 asp.net-web-api2 c# entity-framework entity-framework-core
asked by djangojazz

Getting error in Entity Framework when trying to add an item

I'm getting the below error when trying to add an item to the database context. I'm using Entity Framework in a Web API project. The sample code is shown below....Exception...System.Data.Entity.Infrastructure.DbUpdateException... HResult=0x80131501 Me...
asp.net-web-api asp.net-web-api2 c# entity-framework entity-framework-6
asked by BipinR

ASP.NET Web API cause exceptions while running on raspberry pi 2 (ARM)

I have coded a Web API in Ubuntu using .NET Core recently and I need to use database to store the application data so that I decided to use EF Core. I ran this project on Ubuntu machine and everything worked appropriately. I've also tried to run it on my ...
asp.net-core asp.net-web-api2 entity-framework-core raspberry-pi sqlite
asked by AmirMohammad Biuki

Entity Framework combining multiple queries into one

I have a query which it need to run 300+ loops every single call. It takes about 10 seconds to complete a call even on a new database. It's unacceptable for a WebAPI call. ...var isAbnormal = false; var list = new List<String>(); //Check date range, log ...
asp.net-web-api2 c# entity-framework entity-framework-6
asked by AppeShopper

How to select the maximum value of a column and retrieve multiple results?

I am struggling to understand how to construct my SQL query using Entity Framework 6 and SQL Server in my ASP.NET Web API v2 project....My table structure: the ...Computers... table is my root table for all computers that have been inventoried by my softw...
asp.net-web-api2 c# entity-framework entity-framework-6 sql-server
asked by soomon

ASP.NET Core Web API & EF Core Models with Foreign Key relationship

I'm developing a basic Web API project for education purposes, and I am having trouble with my EF Model relationships. I have 2 models. ...Message... and ...MessageBoard.......public class Message { public long Id { get; set; } public ...
asp.net asp.net-web-api2 c# entity-framework entity-framework-core
asked by Jack

Page 1 of 1
  • 1

Prime Library

Performance

  • Entity Framework Extensions
  • Entity Framework Classic
  • Bulk Operations
  • Dapper Plus

Expression Evaluator

  • C# Eval Expression
  • SQL Eval Function
More Projects...

Related

  • EF Extensions Online Benchmark
  • WIN an EF Extensions license
  • EF6 BatchSaveChanges for only $79
Get monthly updates by subscribing to our newsletter!
SUBSCRIBE!