linqpad

LINQPad, using multiple datacontexts

偶尔善良 提交于 2019-11-27 05:16:31
问题 I am often comparing data in tables in different databases. These databases do not have the same schema. In TSQL, I can reference them with the DB>user>table structure ( DB1.dbo.Stores , DB2.dbo.OtherPlaces ) to pull the data for comparison. I like the idea of LINQPad quite a bit, but I just can't seem to easily pull data from two different data contexts within the same set of statements. I've seen people suggest simply changing the connection string to pull the data from the other source

How does LINQ expression syntax work with Include() for eager loading

六眼飞鱼酱① 提交于 2019-11-27 04:12:44
I have a query below, but I want to perform an Include() to eager load properties. Actions has a navigation property, User (Action.User) 1) My basic query: from a in Actions join u in Users on a.UserId equals u.UserId select a 2) First attempt: from a in Actions.Include("User") join u in Users on a.UserId equals u.UserId select a But Action.User is not populated. 3) Try to eager load 'User' into the navigation property in action outside of query: (from a in Actions join u in Users on a.UserId equals u.UserId select a).Include("User") In LINQPad trying Include's I get an error: 'System.Linq

How do I use the LINQPad Dump() extension method in Visual Studio? [closed]

隐身守侯 提交于 2019-11-26 17:22:47
LINQPad is amazing, and particularly useful is the Dump() extension methods which renders objects and structs of almost any type, anonymous or not, to the console. Initially, when I moved to Visual Studio 2010, I tried to make my own Dump method using a delegate to get the values to render for anonymous types, etc. It's getting pretty complicated though and while it was fun and educational at first, I need a solid implementation. Having checked out the LINQPad code in .NET Reflector I am even more assured that I'm not going to get the implementation right. Is there a free library I can include

How does LINQ expression syntax work with Include() for eager loading

柔情痞子 提交于 2019-11-26 11:06:43
问题 I have a query below, but I want to perform an Include() to eager load properties. Actions has a navigation property, User (Action.User) 1) My basic query: from a in Actions join u in Users on a.UserId equals u.UserId select a 2) First attempt: from a in Actions.Include(\"User\") join u in Users on a.UserId equals u.UserId select a But Action.User is not populated. 3) Try to eager load \'User\' into the navigation property in action outside of query: (from a in Actions join u in Users on a

LINQPad [extension] methods

穿精又带淫゛_ 提交于 2019-11-26 09:14:29
问题 Does anyone have a complete list of LINQPad extension methods and methods, such as .Dump() SubmitChanges() 回答1: LINQPad defines two extension methods (in LINQPad.Extensions), namely Dump() and Disassemble() . Dump() writes to the output window using LINQPad's output formatter and is overloaded to let you specify a heading: typeof (int).Assembly.Dump (); typeof (int).Assembly.Dump ("mscorlib"); You can also specify a maximum recursion depth to override the default of 5 levels: typeof (int)

How do I use the LINQPad Dump() extension method in Visual Studio? [closed]

家住魔仙堡 提交于 2019-11-26 06:05:42
问题 As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance. Closed 6 years ago . LINQPad is amazing, and particularly useful is the Dump() extension methods which renders objects and structs of almost any type,