Skip to content

Latest commit

 

History

History
20 lines (11 loc) · 755 Bytes

File metadata and controls

20 lines (11 loc) · 755 Bytes

Materialize abritary classes and scalar values from EF Core using raw SQL

Nuget

Provides the SqlQueryAsync<T> and SqlQueryValueAsync<T> methods to help you populate arbitrary classes or a list of primitive types from a raw SQL query.

Sample usage

var context = new ChinookContext();

var result = await context.SqlQueryValueAsync<int>("SELECT 1 AS Value");

var result2 = await context.SqlQueryValueAsync<string>("SELECT 'test' AS Value");

Feedback

Please report any issues, questions and suggestions here