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)

47 results in tag: stored-procedures

EF 6 database first: How to update stored procedures?

We are using ...Entity Framework 6.0.0... and use database first ...(like this)... to generate code from tables and stored procedures. This seems to work great, except that changes in stored procedures are not reflected when updating or refreshing the mo...
ef-database-first entity-framework entity-framework-6 stored-procedures visual-studio-2013
asked by Halvard

Stored procedure has to many arguments specified entity framework

I'm using Entity Framework 6 with Stored Procedures mapping. I have an insert sp with 6 parameters for the insert. The entity that I insert has 8 properties where one property is the Id....The problem is that I get this error:...Procedure or function sp h...
entity-framework entity-framework-6 stored-procedures
asked by Ralph Jansen

Entity Framework 6 and output parameter

First time working with EF in general and wanted to call a stored procedure. So far I've added the stored procedure in a model (.edmx) and I believe that it's calling properly but I'm not sure how to add the output parameter. ...This is what the stored p...
c# entity-framework entity-framework-6 output stored-procedures
asked by Mike Stone

What happens to my DbContext after I run a stored procedure that modifies my entities?

Scenario...: I have a custom ...DbContext.... I am using the ...StoreConnection... property of the underlying ...ObjectContext... to run a stored procedure that modifies several entities (which have a ...DbSet... in my custom ...DbContext...). My DbConte...
c# dbcontext entity-framework entity-framework-6 stored-procedures
asked by Adam Modlin

Stored procedure working when calling exec sp and throws with EF6 on SQL Azure

I have this stored procedure...CREATE PROCEDURE [dbo].[sp_RebuildIndexes] AS BEGIN DECLARE @TableName varchar(255) DECLARE TableCursor CURSOR FOR (SELECT '[' + IST.TABLE_SCHEMA + '].[' + IST.table_name + ']' AS [TableName] FROM INFORMATION_SCHE...
azure-sql-database c# entity-framework entity-framework-6 stored-procedures
asked by JuChom

Stored Procedure returns incorrect scalar value of -1, instead of return value

I am trying to return a scalar value from a stored procedure. I actually want to return the ID of a newly created record, but I have simplified my problem down to a stored procedure that takes an ...int... and attempts to return that same ...int.... This ...
entity-framework entity-framework-6 stored-procedures
asked by mschu

When executing a command, parameters must be exclusively database parameters or values

I am not able to retrieve the ouput value back. I get the following exception:...Execption Type: InvalidOperationException:...When executing a command, parameters must be exclusively database parameters or values....C# Code Method...public Student Insert...
c# entity-framework entity-framework-6 entity-framework-6.1 stored-procedures
asked by Ernie R.

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

Executing a stored procedure that returns a result set and has output parameters with Entity Framework

I have a stored procedure written a few years ago that has output parameters and returns a result set. I'm trying to use it in EntityFramework. Initially, when I imported it, the generated code was using ...ExecuteFunction()... to execute the procedure....
c# entity-framework entity-framework-6 stored-procedures
asked by Tim Coker

Stored procedure whose result set lacks a primary key won't execute with Entity Framework 6

I'm calling a stored procedure whose result set has no primary key, and no candidate keys. I created an entity called ...Foo... to represent a record in the results set, so the stored procedure will result in a ...List<Foo>.... The entity looks something...
c# entity-framework entity-framework-6 stored-procedures
asked by alex

Calling an Oracle stored procedure with Entity Framework code-first and DevArt Drivers

I have an Oracle stored procedure that I am trying to call with EF code-first (...DbContext...) using the DevArt Oracle drivers (latest version). I don't know why this has to be so hard (I wish I was using SQL Server), but I cannot make it work. I am doin...
devart entity-framework entity-framework-6 oracle stored-procedures
asked by jeff.eynon

Retrieve table data from stored procedure using entity framework

I'm using Entity Framework v6. I have a stored procedure as shown below...CREATE PROCEDURE [dbo].[GetCountryList] ( @CustomerName VARCHAR(MAX), @SearchCriteria VARCHAR(MAX) ) AS BEGIN SET NOCOUNT ON SELECT CountryID, CountryName...
c# entity-framework entity-framework-6 sql-server stored-procedures
asked by Riki

Entity Framework code-first error when using stored procedure with fields that have default value

I need to insert an entity by calling a stored procedure. The table in the database has a column called ...CreateDateTime... that has a default value of ...GetDate().... ...I do not let the stored procedure set / update the ...CreateDateTime... column. ....
c# entity-framework entity-framework-6 sql-server stored-procedures
asked by goroth

how to include stored procedures with Entity Framework Reverse POCO Generator version 2.14.3

I am using the Entity Framework Reverse POCO Generator version 2.14.3 and I would like to include only stored procedures with name starts "usp_CMT_update*" in Apps schema. I used default settings for stored proocedure in the .tt file but only some of the...
entity-framework entity-framework-6 poco sql-server stored-procedures
asked by user266909

Entity Framework 7 Stored Procedure Result to Model

I have a Model which is mapped to the database via EF7. All properties are identical to the mapped columns of the table....Now I have a Stored Procedure, which returns some Joined Columns but the basis is still the mapped Model....Here is my model(Entity)...
c# entities entity-framework-core sql-server stored-procedures
asked by nicn

Entity Framework core stored procedure

I am working with EF Core (code-first), and want to grab the data from a stored procedure. The returned result should be the class I defined based on the result return. ...I could make it work if the return type is one of the entities. ex. ..._context.Set...
entity-framework-core stored-procedures
asked by GSH

How to call stored procedure from EntityFramework 6 with 'hierarchyid' parameter

I am developing a service using WebApi2 and EntityFramework6. I have a legacy SQLServer DB that my service must work with....That DB is using heavily the 'hierarchyid' data type and this type is used internally in DB's stored procedures....Seems like EF6...
entity-framework entity-framework-6 hierarchyid sql-server stored-procedures
asked by Shonn Lyga

EF Core FromSQL query does not get executed immediately (PostgreSQL)

I have written a function in PostgreSQL for insertion as follows:...CREATE OR REPLACE FUNCTION public.insert_blog("Url" character) RETURNS void AS $BODY$Begin Insert Into "Blogs"("Url") Values("Url"); End$BODY$ LANGUAGE plpgsql VOLATILE COST 100...
.net-core entity-framework-core function postgresql stored-procedures
asked by Amol Kolekar

Entity Framework Core - Mapping Raw Query(DTO Class without ID field) , Scalar

I am using EFCore with ASPNETCore, everything looks great, but I find these two situations:...I have created a DTO classes that are not tables in the database, these classes that will map a raw SQL query or procedure....So I need to map the results of an ...
c# dbcontext entity-framework entity-framework-core stored-procedures
asked by Jose Eduardo Poma Caceres

Can't get stored procedure results with Entity Framework 6

I have a stored procedure which returns a ...0... or a ...1... depending on whether or not a specified email address exists in my database:...CREATE PROCEDURE [DatabaseSchema].[EmailAddressIsDuplicate] (@emailAddress nvarchar(255)) AS BEGIN SET NOCOUN...
c# entity-framework entity-framework-6 sql-server stored-procedures
asked by alex

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
Get monthly updates by subscribing to our newsletter!
SUBSCRIBE!