[dba-VB] C# programming exercises: Sample 1 - Run parallel tests from this assembly test classes

Gustav Brock gustav at cactus.dk
Tue Jun 19 11:51:47 CDT 2012


Hi Shamil

Yes, I do have a "Pro" license for LINQPad but I had no idea you could use it for this level of code. I've only used it to find out LINQ queries.

I've read some free chapters from the previous book - very good - but didn't buy the book. Perhaps it is time now to spend some money.

As for the EF code generation: Why not ask the author, Joseph Albahari? As I understand it, he will be happy to answer.

/gustav


>>> Salakhetdinov Shamil <mcp2004 at mail.ru> 19-06-12 18:27 >>>
Hi Gustav --

Yes, I have run this code in LINQPad 4.42.1, I have got purchased a Premium version to have Intellisense etc. 
LINQPad is a great C# learning/mastering/"code snippeting"/experimenting tool. 
But you know that LINQPad is a great tool AFAIK :)

I have put .Sleep(1000) in Test1 class Setup method to show that in this case Test2 runs first and in parallel - did you mean that?

> That looks clever and tight.
Thank you, just a bit maybe - when I'm reading "C# 4.0 in a Nutshell" by Joseph and Ben Albahari I'm feeling myself as a 1st grade pupil - the concepts and techniques of modern C# (functional)  parallel programming they present in many parts of heir book are so advanced...

BTW, I still can't get how LINQPad dynamically builds ADO.NET EF model/assembly from given MS SQL database connection - have you seen/read anywhere how it's done, what (third party) .NET classlibs they use?

Thank you.

-- Shamil

Tue, 19 Jun 2012 18:18:13 +0200 от "Gustav Brock" <gustav at cactus.dk>:
> Hi Shamil
> 
> That looks clever and tight.
> I guess if you didn't have the Sleep(1000) method, the code would run with one timestamp only.
> 
> But do you really run this from within LINQPad?
> 
> /gustav
> 
> 
> >>> Salakhetdinov Shamil <mcp2004 at mail.ru> 19-06-12 17:57 >>>
> Hi All -
> 
> I wanted to share some code snippets I'm getting written here while mastering C# programming using LINQPad.
> Presented here code snippet will instantiate and run in parallel two sample test classes resulting in an output as the following:
> 
> 19.06.2012 19:49:42: Test1 instantiated.
> 19.06.2012 19:49:42: Test2 instantiated.
> 19.06.2012 19:49:42: Test1 setup.
> 19.06.2012 19:49:42: Test2 setup.
> 19.06.2012 19:49:43: Test2 run started...
> 19.06.2012 19:49:44: Test1 run started...
> 19.06.2012 19:49:44: Test2 run completed.
> 19.06.2012 19:49:44: Test2 tear down.
> 19.06.2012 19:49:45: Test1 run completed.
> 19.06.2012 19:49:45: Test1 tear down.
> 
> All and any comments & remarks are very welcome!
> 
> Thank you.
> 
> -- Shamil



More information about the dba-VB mailing list