Okay, so you donβt like the route of the stored procedures .... and I'm not honest, but this is the fastest way I could do this.
Based on this, I do not know what an easy way to create temporary tables in EDM, so my next suggestion would be to create local objects that mimic the temporary table that you want to create. The temporary name, obviously, indicates that you do not want them to reside permanently in the database, so using memory objects has much more controllability and (depending on your delay) is faster than making several calls in the database.
public class MyTempTable { public string ID { get; set; } public string Column1 { get; set; }
Once you have created your list of objects, you can basically do everything that you usually do in the database table using Linq.
source share