0

Is there a way to use SQL Server table-valued parameters in Entity Framework in a way that doesn't require you to use a stored procedure or string-based queries like context.Database.ExecuteSqlCommandAsync("") ?

Something similar to Dapper where I can pass a DataTable and specify the user-defined type name to use. Probably must be some sort of overload of IEnumerable<>.Contains() or .Join() so that I can build a join in a generated query.

The goal is to stay with expression trees and don't mess with strings.

2
  • Not as far as I am aware, although you may be able to write some sort of extension to EF to do this Commented Jan 24, 2022 at 15:32
  • 1
    You can use Dapper and EF together. Commented Jan 25, 2022 at 2:20

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.