1

Is there a way to return a single string result from a raw sql query in asp.net core 2.2 without referring to a DBSet in the databaseContext?

object[] parameters = ...;
string query=@" select (select string_agg(bio.""Table"".""Column"", ',') from schema.""Table"")
                from schema2.""Table2"" 
                ...
             ";
this.GetDatabaseContext().??????.FromSQL(query, parameters);
Wouter
  • 1,293
  • 2
  • 16
  • 34
  • see if this helps.. https://stackoverflow.com/questions/35631903/raw-sql-query-without-dbset-entity-framework-core – Bob Ash Feb 12 '20 at 10:02
  • Not really, I currently solved my problem with ADO.Net and DbCommand. But would be nicer If there was a EF solution – Wouter Feb 12 '20 at 11:33

0 Answers0