Home

How to use FromSqlRaw, FromSqlInterpolated and ExecuteSqlRaw, ExecuteSqlInterpolated

Hi everybody!

I am developing an ASP.NET Core MVC app since .Net Core 1.0 and was happy to find LinqPad.

But there is one problem an i don't find any answer to this.

I want to use raw sql queries in LinqPad.

In VS it looks like this:
_context.Database.ExecuteSqlInterplated($"exec my_sp {myvar}");

I know that LinqPad creates a context for me, so i tried this:
TypedDataContext db = new TypedDataContext();
db.Database...

But, there is not "Database" method :-(

Can anyone tell me how to do this?

Comments

Sign In or Register to comment.