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

Entity Framework 6 - Knowledge Base (KB)

English (en) Français (fr) Español (es) Italiano (it) Deutsch (de) русский (ru) 한국어 (ko) 日本語 (ja) 中文简体 (zh-CN) 中文繁體 (zh-TW)

114 results for: in tag: asp.net-web-api

How to mix Entity Framework with Web API

I'm researching the new ASP.NET MVC4 Web API framework. I'm running Visual Studio 2011 beta on the Windows 8 consumer preview. ...My problem is that none of the official samples for the new Web API framework use any kind of database backend. In the past, ...
asp.net asp.net-mvc asp.net-web-api entity-framework
asked by Jeremy Bell

The magic number in GZip header is not correct. Make sure you are passing in a GZip stream

I am trying to retrieve product name and its ids as NameID object from EntityFramework using WebAPI. code for which is as following....public class ProductController : ApiController { protected MainDataContext db = new MainDataContext(); // GET /a...
asp.net-web-api c# entity-framework
asked by Anuj Pandey

Translating expression tree from a type to another type with complex mappings

inspired by ...this answer... I'm trying to map a property on a model class to an expression based on the actual entity. These are the two classes involved:...public class Customer { public string FirstName { get; set; } public string LastName { g...
asp.net-web-api entity-framework expression-trees linq
asked by Kralizek

Entity Framework not serviceable in my WebAPI Mvc4 solution

I have made Entity Framework Code First with fluent api....I have a web api controller:...public class NewsController : ApiController { private TrafficTheoryContext db = new TrafficTheoryContext(); // GET api/News public IEnumerable<News> Get...
asp.net-web-api entity-framework
asked by Poul K. Sørensen

Build ASP.Net application with Web API and database first strategy

I am new to ASP.NET MVC 4 and Web API....What I want to achieve is to create a CRUD web application that is able to manipulate the data tables in a simple existing SQL Server 2008 database....I thought about the new MVC 4 with Web API and Entity Framework...
asp.net asp.net-mvc asp.net-web-api crud entity-framework
asked by alextc

Recreate and Reseed LocalDb Before Each Unit Test

I'm attempting to write unit/integration tests for my ASP.NET Web API project and struggling to run each test in isolation. Allow me to explain....I have a *.testsettings file with deployment settings configured. Before each test run, an empty *.mdf fil...
asp.net-web-api ef-code-first entity-framework localdb unit-testing
asked by Raymond Saltrelli

Using EF and WebAPI, how can I return a ViewModel AND support IQueryable/OData?

I've got an ASP.NET WebAPI project. I've recently created EntityFramework entities for all my data tables. But I don't want to expose my data layer & schema to my users. How can I map my entities to a ViewModel (automapper?) ...and... provide IQueryable r...
asp.net-web-api entity-framework iqueryable odata
asked by Eric Falsken

Samples not working for Web API Help Page when using an Entity Framework Complex Type in the model

I have an EF code first model that includes some Complex Types. Generating Web API controllers works without any problem, but when generating the Web API Help Page as described in ...http://blogs.msdn.com/b/yaohuang1/archive/2012/08/15/introducing-the-asp...
asp.net-web-api entity-framework serialization
asked by kkara

OData exception The complex type 'WebTools.Order' refers to the entity type 'WebTools.Customer' through the property 'Customer'

I'm getting started with OData and Entity Framework....I created a Controller that exposes Customer. In the model (edmx) there's only one Entity (Customer) and everything works fine (data is being rendered)....Now, when I add a second entity (Order) (Upd...
asp.net-web-api entity-framework odata
asked by Patrice Calvé

WebApi OData: $filter 'any' or 'all' query not working

First, using the ASP.NET WebApi tutorials I've created a basic ...ApiController that exposes an Entity Framework model through OData.... The service works to return json for OData $filter queries....When I perform OData ...$filter queries that include "an...
asp.net-web-api entity-framework odata
asked by Chris Pietschmann

How to generate and auto increment Id with Entity Framework

Revised... entire post....I'm trying to post the following JSON POST request via Fiddler:...{Username:"Bob", FirstName:"Foo", LastName:"Bar", Password:"123", Headline:"Tuna"} ...However I'm getting this error:...Message "Cannot insert the value NULL into ...
asp.net-web-api c# entity-framework json
asked by brk

Using IQueryable select to filter columns

I've been exploring WEB API based on the guide at www.asp.net, and I've run into a problem when trying to filter columns from a table....My code is simply this:... // GET api/Admin public IEnumerable<Product> GetProducts(testvar = "") { ...
asp.net-mvc asp.net-web-api c# entity-framework iqueryable
asked by ASouthorn

How we survive using a local time zone with Breeze

I'm writing this to gather comments on our approaches and hopefully help someone else (and my memory)....Scenario...All of our databases use ...DateTime... data types with no time zone information. ...Internally we know that all of the dates/times in our ...
asp.net-web-api breeze datetime entity-framework timezone
asked by Brendan

"Object reference not set to an instance of an object" when creating a new Web API controller with EF Scaffolding in Visual Studio 2012

I have an MVC4/Web API project, with an Entity Framework, Code First data model. When I try to create a new API Controller with read/write methods using a data context & model, I get an alert saying "Object reference not set to an instance of an object"..
asp.net-mvc-4 asp.net-web-api ef-code-first entity-framework visual-studio-2012
asked by JustinMoser

Entity framework creates duplicate entities

Edit...I've recorded a screencast with my problem, you can find it ...here..., please look if you have time....I have the following code that should perform AddOrUpdate functionality, but instead all existing records are recreated, so as a result I have s...
asp.net-mvc-4 asp.net-web-api c# entity-framework
asked by Lu4

Self referencing loop detected - Getting back data from WebApi to the browser

I am using Entity Framework and having a problem with getting parent and child data to the browser. Here are my classes:... public class Question { public int QuestionId { get; set; } public string Title { get; set; } public virtual ICollecti...
asp.net-web-api c# entity-framework json.net serialization
asked by user1943020

Circular Reference error when serializing objects in ASP.NET Web API

I'm writing a Web API project in C# that uses Entity Framework to pull data from a DB, serialize it and send it to a client....My project has 2 classes, Post and Comment (foreign key from Post)....These are my classes....Post class:...public partial class...
asp.net-mvc-4 asp.net-web-api circular-reference entity-framework serialization
asked by Léster

Always have error "The ObjectContent 1 type failed to serialize the response body..."

I use Web api to retrieve data from the database. I only have 1 table "tblMessage" and want to get data from that table....I set everything up but then when I run the website. the error always say...The 'ObjectContent`1' type failed to serialize the respo...
asp.net-web-api c# entity-framework json.net serialization
asked by kaboom

Impersonation and asynchrony in ASP.NET WebAPI

Update 2...This question originally was "Does impersonation work with Web API?"... And the question to that question is "Yes, it does." ...But the problem was not about Web API but impersonation itself. (The description of the problem is below)...But now ...
.net asp.net-web-api entity-framework impersonation
asked by Pavel Voronin

Change Database during runtime in Entity Framework, without changing the Connection

I have a server that hosts 50 databases with identical schemas, and I want to start using Entity Framework in our next version....I don't need a new connection for each of those databases. The privileges of the one connection can talk to all of the 50 da...
asp.net-web-api c# entity-framework sql-server
asked by user2197022

Page 1 of 6
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • »

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

Try for free now