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

Articles

3 results for:

Raw SQL Queries

Raw SQL Queries...Introduction...Entity Framework Core allows you to execute raw SQL queries directly against the database where you cannot use LINQ to represent the query if the generated SQL is not efficient enough. EF Core provides the ...DbSet.FromSql()... method to execute raw SQL queries....using (var context = new MyContext()) { var customers = context.Customers .FromSql("SELECT * FROM dbo.Customers") .ToList(); } ...In the above example, the raw SQL query is specified...
query sql

Stored Procedure

Stored Procedure...The Entity Framework allows you to use stored procedures to perform predefined logic on database tables. Raw SQL queries can be used to execute a stored procedure....Here is a simple stored procedure, it will return all the records from Customers table when executed....IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[GetAllCustomers]') AND type in (N'P', N'PC')) BEGIN EXEC dbo.sp_executesql @statement = N' CREATE PROCEDURE [dbo].[GetAll...
query stored-procedure sql

Stored Procedure

Stored Procedure...Introduction...The Entity Framework allows you to use stored procedures to perform predefined logic on database tables. Raw SQL queries can be used to execute a stored procedure....Here is a simple stored procedure, it will insert a customer record into a Customers table when executed....IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[CreateCustomer]') AND type in (N'P', N'PC')) BEGIN EXEC dbo.sp_executesql @statement = N' CREATE PROC...
save stored-procedure sql

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