My situation is that I need to query from another database and show the result in my application. Both databases are on the same server. I came up with an idea on creating SQL-View in my database which would query the other database for values that I want. But I am not quite sure on how I can create or map SQL-View from the ABP framework?
I am using the full .Net framework with the Angular template.
Creating View is not directly supported in EF. So you can try the below approach.
Add-Migration
.Up
method of generated migration
and run the script using context.Database.ExecuteSqlCommand
method.Table
as you do for your model class.[Table("YourViewName")]
public class YourClassName
{
}
modelBuilder.Ignore<yourClassName>();
in OnModelCreating
method.Update-Database
in Package Manager Console.