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)

20 results in tag: sql-server-2012

SQL Server CE versus SQL LocalDB

I have a small project that will have 1 user on 1 computer. The database will be rather small (probably less than 1 mb of data). I plan to use WPF and Entity Framework for that project....I came up with 2 potential database solutions for my project : ...S...
entity-framework sql-server sql-server-2012 sql-server-ce sql-server-express
asked by danbord

Running SQL Server CE 4 Queries with Visual Studio 2012 and SQL Server Management Studio 2012

I have recently upgraded to Visual Studio 2012 and SQL Server Management Studio 2012, however I cannot seem to see how to execute SQL scripts (created by Entity framework) on a SQL Server CE 4.0 database. With VS2010 + SSMS 2008 the Transact-SQL editor wo...
entity-framework sql-server-2012 sql-server-ce visual-studio-2012
asked by Ryan Amies

Entity Framework 6 with SQL Server 2012 gives System.Data.Entity.Core.ProviderIncompatibleException

I have Visual Studio 2012 and I'm using the Entity Framework stack with EF 6. I did all correct but while adding migration I am getting the error . ...System.Data.Entity.Core.ProviderIncompatibleException...Here are the classes ...public class Order { ...
entity-framework-6 sql-server-2012
asked by Joy

SQL conversion from varchar to uniqueidentifier fails in view

I'm stuck on the following scenario. I have a database with a table with customer data and a table where I put records for monitoring what is happening on our B2B site. ...The customer table is as follow:...ID, int, not null...GUID, uniqueidentfier, not ...
entity-framework sql sql-server sql-server-2012
asked by CyclingFreak

Creating indexes with Entity Framework 6 Migrations

Is there a way to create an index in MS SQL Server database using Entity Framework Code First Migrations, if the index has to be: ...descending by at least one column...including other columns...?...It has to produce something like this:...CREATE NONCLUST...
ef-code-first entity-framework entity-framework-6 indexing sql-server-2012
asked by Michael Sagalovich

How do I use spatials to search a radius of zip codes?

Background...I'm writing an application which finds events within a certain radius of a zip code. You can think of this like ticketmaster, where you type in your zip code and all of the concerts in the radius of x show up....I have a database table which ...
c# entity-framework entity-framework-6 sql-server-2012
asked by Steve's a D

Code first custom SQL migration timeout exception

I am trying to create FULL TEXT index using Entity Framework Migration by executing custom Sql....My migration class looks like this:...public partial class DocumentContentFullTextIndex : DbMigration { public override void Up() { AlterColu...
ef-migrations entity-framework-6 full-text-indexing sql-server-2012
asked by Nick

What is the difference between ExecuteSqlCommand vs SqlQuery ? when doing a db access?

I have had a couple of suggestions on how to access data from my database:...var allMyIds = context.Database.ExecuteSqlCommand("select id from AspNetUserLogins"); var allMyIds = context.Database.SqlQuery<string>("select id from AspNetUserLogins")...
asp.net c# entity-framework entity-framework-6 sql-server-2012
asked by Samantha J T Star

How to get next value of SQL Server sequence in Entity Framework?

I want to make use SQL Server ...sequence... objects... in Entity Framework to show number sequence before save it into database. ...In current scenario I'm doing something related by increment by one in stored procedure (previous value stored in one tab...
c# entity-framework orm sql-server sql-server-2012
asked by ManirajSS

Entity Framework: how to find transaction isolation level in SQL Profiler?

BeginTransaction... method is used to manage transactions in Entity Framework 6. It allows to set isolation level for transaction as you may see in code below (just a sample):...using (var context = new DataContext()) { using (var transaction = contex...
entity-framework entity-framework-6 sql-server sql-server-2012 transactions
asked by Ilya Chumakov

Insert Null values in SQL Server Table from ASP.NET-MVC app

I am working on ASP.NET-MVC5 app and I have tables in which I need to insert null values in some of the attribute but I am getting null value exception error. I have 5 bit fields in this table which need to update invidually ...error...Model class...publi...
asp.net-mvc-5 c# entity-framework-6 linq sql-server-2012
asked by Toxic

LocalDB instance specified does not exist

I am trying to build an ASP.NET MVC 5 Web Application in SQL Server 2015 Express using EntityFramework 6 but when I debug the application and go to a page where the database is needed I get the following error....System.Data.SqlClient.SqlException was unh...
c# entity-framework localdb sql-server-2012
asked by Alexandra

The parameterized query expects the parameter p1 which was not supplied

I have a stored proc as below:...CREATE PROCEDURE [dbo].[MyProc] @p1 as int, @p2 as smalldatetime, @p3 as int, @p4 as varchar(255), @p5 as int = null, @p6 as numeric(18,2) = 0, @p7 as char(2) = null AS ... ...When I execute t...
.net-4.5 asp.net-web-api c# entity-framework-6 sql-server-2012
asked by user007

Add a localdb for tests

I use entity framework 6 code first. ...At the moment I have a database for production. I want to add a different database for tests. How do I do that? ...Do I need another connection string in my tests project? ...What should be the difference between t...
c# ef-code-first entity-framework-6 localdb sql-server-2012
asked by user5326354

Convert 'string' to 'int' in an .Any() LINQ query

I have a conditional statement that evaluates an ....Any()... LINQ query against my DB....It is throwing an error when casting/converting a string to long value....(long.TryParse(m.Reference,out t)? t : long.MaxValue) ...The error is something like:...LIN...
c# entity-framework entity-framework-6 linq sql-server-2012
asked by Mark

EF 6.x and function with table-valued parameter

I have a DB function requiring a table-valued parameter as argument (@c)....CREATE TABLE Test ( CD varchar(10) not null ) GO INSERT INTO Test VALUES ('TEST') GO CREATE TYPE [CdTable] AS TABLE (CD varchar(10)); GO CREATE FUNCTION TestTbl ( @x varcha...
c# entity-framework entity-framework-6 sql-server sql-server-2012
asked by zpul

"A dependent property in a ReferentialConstraint is mapped to a store-generated column." on a persisted computed column (EntityFramework DB first)

I've implemented a simulated table inheritance construct in my SQL-Server based on the article ...Implementing Table Inheritance in SQL Server.... ...Besides the fact to use simple 1 to 0...1 relationships you create another constraint to a type table tha...
asp.net c# entity-framework entity-framework-6 sql-server-2012
asked by Martin Braun

How to compute dependent fields and combine rows with null values in TPH

If I have a ...De-normalized... table like this :...FinanceList (NetSales,Expenses,Receivables,...etc,Discriminator) ...And I have another table (...PeriodType...) which i categorize the year according to two methods :...Quarter... (4 periods)...1-...Peri...
dapper entity-framework sql sql-server sql-server-2012
asked by Anyname Donotcare

EF6 Read uncommitted data

I need to perform a transaction like below:...Start transaction: Here I call ...context.Database.BeginTransaction()... (please note the ...context... here is not the same one below in the question where I want to read uncommitted)...Save a contact (done u...
c# entity-framework-6 sql-server-2012
asked by CodingYoshi

How to avoid the "Incorrect syntax near 'OFFSET'. Invalid usage of the option NEXT in the FETCH statement."

I am working on an ASP.NET MVC 5 web application which uses Entity Framework version 6. ...Now I develop the application on SQL Server 2012 inside my development server. I mapped my database tables and I generate the ....edmx... model file. Everything is ...
asp.net-mvc-5 edmx entity-framework-6 sql-server-2008 sql-server-2012
asked by john Gu

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
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!