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)

14 results in tag: sql-server-2008

Multiplicity constraint violated. The role Child_Parent_Target of the relationship Child_Parent has multiplicity 1 or 0..1

I did a lot of research but haven't found any answer that matches my problem. I even tried to use the ...The relationship could not be changed because one or more of the foreign-key properties is non-nullable... example. No success....I'm working with Ent...
c# code-first entity-framework entity-framework-6 sql-server-2008
asked by Marco Alves

Updating models from database in Entity Framework 6.0

I'm developing a Web API Service (in Visual Studio 2013), and I've added, in my solution, ADO.NET Entity Data Model (Database First)....All the tables I've included, are correctly created in my edmx diagram....Then I've made some changes: I've added two n...
ado.net-entity-data-model c# entity-framework entity-framework-6 sql-server-2008
asked by GVillani82

Entity Framework 6 GUID as primary key: Cannot insert the value NULL into column 'Id', table 'FileStore'; column does not allow nulls

I have an entity with primary key "Id" which is Guid:...public class FileStore { public Guid Id { get; set; } public string Name { get; set; } public string Path { get; set; } } ...And some configuration:...protected override void OnModelCreat...
c# entity-framework entity-framework-6 sql-server-2008
asked by Algirdas

How to execute a stored procedure without returning results in Entity Framework 6?

I have a stored procedure like this:...CREATE PROCEDURE InsertTest(@p1 NVARCHAR(50) , @p2 INT) AS BEGIN INSERT INTO dbo.Test(Name, Code) VALUES ( N'', 0) END ...or other ...I try with this code:...context.Database.SqlQuery<int>("InsertTest @p1 , @...
code-first entity-framework entity-framework-6 sql-server-2008 stored-procedures
asked by ramin_rp

Entity Framework 6: Multicolumn unique index featuring navigation property

How can I set multicolumn index on model like that:...public class Meta { [DatabaseGenerated(DatabaseGeneratedOption.Identity)] [Key] public Guid Id { get; set; } [Index("MetaPeriodDateUnq", IsUnique = true, Order = 2)] [Required] ...
c# entity-framework entity-framework-6 sql sql-server-2008
asked by Sergey Prytkov

Paging with Entity Framework 7 and SQL Server 2008

I'm trying to use paging (that is ....Skip(...).Take(...)... in Entity Framework 7. It works OK with Microsoft SQL Server 2012 and 2014, but fails with the following error on SQL Server 2008:...System.Data.SqlClient.SqlException (0x80131904): Incorrect sy...
asp.net-mvc entity-framework-core paging sql-server-2008
asked by Konstantin

SQL Server 2008 and EF7 (RC1) - Cannot Skip() and Take()?

I am aware that SQL Server 2012 and above has a new OFFSET syntax for pagination, which Entity Framework 7 seems to translate my LINQ to....This explains why I'm getting the error ...Incorrect syntax near 'OFFSET'. Invalid usage of the option NEXT in the ...
asp.net-core entity-framework-core pagination sql-server-2008
asked by Mickael Caruso

Entity Framework query performance differs extrem with raw SQL execution

I have a question about Entity Framework query execution performance....Schema...:...I have a table structure like this:...CREATE TABLE [dbo].[DataLogger] ( [ID] [bigint] IDENTITY(1,1) NOT NULL, [ProjectID] [bigint] NULL, CONSTRAINT [PrimaryKe...
c# entity-framework entity-framework-6 sql-server sql-server-2008
asked by Steffen Mangold

MS SQL Auto Increment non Identity Column

I have a table with an auto incrementing identity/primary key column called ID....CREATE TABLE Table1( [ID] [bigint] IDENTITY(1,1) NOT NULL, [TextContent] [nvarchar](450) NOT NULL, [Version] [bigint] NOT NULL) ...When I UPDATE [TextContent], I'd like [...
entity-framework entity-framework-core sql-server sql-server-2008 tsql
asked by Simon Ordo

UseRowNumberForPaging is not a valid

I'm using ..."Microsoft.EntityFrameworkCore.SqlServer": "1.0.0-rc2-final"... with ...SQL 2008... and according to some results found on Google, I just have to add the option to ....UseRowNmberForPaging()... when creating a new ...DBcontext.... This was th...
asp.net-core-mvc entity-framework-core sql-server-2008
asked by T. Lee

ASP.NET Core Web API on Ubuntu 14.04 LTS doesn't get SQL connection to MSSQL 2008 server

I created a small ASP.NET core web api using MVC and Entity Framework. I managed to build and publish it for/to Ubuntu....When I enter the url swagger shows up as expected. But when I try to access a resource (click a link to the web api) it throws an exc...
asp.net-core asp.net-web-api entity-framework-core sql-server-2008 ubuntu-14.04
asked by monty

Offset/Fetch based paging (Implementation) in EntityFramework (Using LINQ) for SQL Server 2008

I am using SQL Server 2008 and Entity Framework 6.1.3. I wish to implement pagination of data based on OFFSET/FETCH rather than Take() & Skip()....I searched online with no luck. Some posts suggested migrating to SQL Server 2012. Which is not an option in...
entity-framework entity-framework-6 pagination sql-server sql-server-2008
asked by Immortal

Can you remove Identity from a primary key with Entity Framework 6?

I created a table via entity framework code-first with a primary key set to auto increment, but now I want to remove that auto-incrementing from the column. I've tried doing that with both fluent API:...public class ProductTypeMap: EntityTypeConfiguratio...
entity-framework entity-framework-6 sql-server-2008
asked by tomRedox

Incorrect syntax near 'OFFSET'. Invalid usage of the option NEXT in the FETCH statement "in Entity Framework core"

Here's my EF Core code:... int page = 1, rowPerPage = 5; int count = ctx.Specialty.Count(); int start = page * rowPerPage; var Select = ctx.Specialty.OrderByDescending(u => u.IdS) .Skip(start) .Take(rowPerPage) .AsE...
asp.net asp.net-core c# entity-framework-core sql-server-2008
asked by Alireza

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!