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

Entity Framework 6 - Knowledge Base (KB)

42 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

VS 2013 Lightswitch new record creation with identity field

I have a very basic testbed Lightswitch 2013 application, using an OData data source via Web API 2 and beyond that Entity Framework 6. The table in question has an auto-incrementing id field which is the primary key. ...All is good in the sense that I can...
asp.net-web-api2 entity-framework-6 odata visual-studio-2013 visual-studio-lightswitch
asked by Alan B

Adding a custom query backed Navigation Property to ODataConventionModelBuilder

Situation...I created the following Model classes...public class Car { public int Id {get;set;} public string Name {get;set;} public virtual ICollection<PartState> PartStates {get;set; } } public class PartState { public int Id {get;set;...
asp.net-web-api asp.net-web-api2 c# entity-framework odata
asked by LunicLynx

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

Handling Dates with OData v4, EF6 and Web API v2.2

I'm in the midst of upgrading from v1-3 to v4, but I've run into a few problems....My understanding is that DateTime is unsupported, and I have to always use DateTimeOffset. Fine....But before I was storing Sql ...date... data type in the DateTime, now it...
asp.net-web-api asp.net-web-api2 entity-framework odata
asked by Tim

error when trying to get entity related to entity in webapi 2

Models:...public class Dog { [Key, DatabaseGenerated(System.ComponentModel.DataAnnotations.Schema.DatabaseGeneratedOption.Identity)] public Guid Id { get; set; } [Required] public string Name { get; set; } pub...
asp.net-web-api2 entity-framework-6
asked by nadav

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

Can GraphDiff be used for partial updates of simple entities too?

I have a WebApi2 project with EF6 CodeFirst. I'm also using AutoMapper to map between my models and dto's. I'm not using OData. ...I'm trying to find a solution to handle updates of entities. As I'm not using OData I can't use Delta and I would not like t...
asp.net-web-api2 c# entity-framework graphdiff
asked by Ivan-Mark Debono

How do I serialize an IdentityUser reference in Web API 2.2?

The Visual Studio "Web API" project template includes endpoints for handling registration, authentication, and authorization of users. In a production application, however, users will typically be associated with other Entities as well, such as:...public ...
asp.net-identity asp.net-web-api2 c# entity-framework-6 serialization
asked by Jeremy Caney

How to register per request dependencies using StructureMap, MVC 5, and WebApi 2?

I have a Mvc5-WebApi2 application that uses StructureMap for dependency injection using the StructureMap.Mvc5 and StructureMap.WebApi2 Nuget packages. I want to register my EF 6 DbContext with HttpContext lifecycle for both MVC and Web controllers. Can so...
asp.net-mvc-5 asp.net-web-api2 entity-framework-6 structuremap
asked by flipdoubt

WEB API JSON Serializing Circular References

I'm trying to access the property fields (JSON) from the child entity that is received from Web API. By looking at the browser console, however, it is showing a reference instead of the fields. How do I get access to these fields?...ANGULAR JS VIEW... <ta...
asp.net-web-api2 entity-framework-6 json.net
asked by Erkan Demir

Download Binary from WebApi2 As File. Server Side

I've looked a couple of answers on here but still having an issue.... One system is saving a binary byte[] into SQL 2014 with Entity Framework 6....I have a "name" of the record (not the file) but I want to serve up the binary data as a downloadable file ...
asp.net asp.net-web-api2 binaryfiles c# entity-framework-6
asked by Mastro

Return an object along with a 409 Conflict error in a Web API 2 POST call backed by Entity Framework?

I have a C# Entity Framework ...Web API 2 controller.... Currently when an attempt is made via the ...POST... method to create an object with the same text for the main text field, I return a ...409 Conflict error... as an ...StatusCode... result to indi...
asp.net-mvc asp.net-web-api2 c# entity-framework-6
asked by Robert Oschler

DB-First authentication confusion with ASP.NET Web API 2 + EF6

I need to create a Web API C# application for an existing MySQL database. I've managed to use Entity Framework 6 to bind every database table to a RESTful API ...(that allows CRUD operations).......I want to implement a login/registration system ...(so th...
asp.net asp.net-web-api2 c# ef-database-first entity-framework
asked by Vittorio Romeo

OData V4 modify $filter on server side

I would like to be able to modify the filter inside the controller and then return the data based on the altered filter. ...So for I have an ODataQueryOptions parameter on the server side that I can use to look at the FilterQueryOption. ...Let's assume ...
asp.net-web-api asp.net-web-api2 entity-framework-6 odata
asked by goroth

EF + AutoFac + async "The connection's current state is connecting"

I have a WebApi controller that has services injected by AutoFac in the OWIN Startup class...builder.Register(c => new MyEntities()).InstancePerRequest(); ...I have also tried ...builder.Register(c => new MyEntities()).InstancePerLifetimeScope(); ...In a ...
asp.net-web-api2 async-await autofac c# entity-framework-6
asked by Paul McCowat

Web api working locally but not when deployed to Azure

I have a Web Api that I have developed which works perfectly fine when run locally, but when I publish it on Azure, I get a ...500 Internal Sever Error.......I have 3 tables in the Database - "Messages", "Users", "Conversations"...The error only happens w...
asp.net-web-api2 azure-sql-database c# ef-code-first entity-framework-6
asked by semiColon

JsonFormatter ReferenceLoopHandling

I have been struggling with this for a few days now, not finding any joy in any solutions I have found so far....The project is built using Entity Framework 6 and WebAPI 2. I have changed the my WebApiConfig settings to ... config.Formatters.Remove...
asp.net-web-api2 c# entity-framework-6 json.net
asked by Dimitris Savva

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

CPU reach 100% in in 200 request per second in iis 8.5

App hosted in IIS 8.5 on dedicated server with configuration dual xeon E5 2620 v2, 64 GB Ram, 1 TB HDD....Server Technolgy : ...Web api 2, Angular js, Entity framework 6.0, SQL server 2014.... Client Side : ...web browser with angularjs and android mobile...
asp.net-web-api2 autofac cpu-usage entity-framework-6 iis-8.5
asked by Sanjay

Page 1 of 3
  • 1
  • 2
  • 3
  • »

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
Save your entities 20× faster with EF Extensions
SaveChanges vs BulkSaveChanges

EF Extensions
Try for free now
Get monthly updates by subscribing to our newsletter!
SUBSCRIBE!