Author Archives: Matthieu MEZIL

To WAQS or not to WAQS, that is the question – ASP.NET MVC Patterns comparison

I recently asked to some of my friends who didn’t use WAQS yet why. I got different replies. One of them was replied by many of them: I just develop basic ASP.NET MVC applications so I think WAQS is useless … Continue reading

Posted in 16868, 18472 | 2 Comments

WAQS NuGet PowerShell command usage: init ViewModel using Roslyn

If you take a look to WCFAsyncQueryableFunctionsClientWPF.psm1 of WCFAsyncQueryableServices.Client.WPF NuGet package, you can see the PowerShell command used to initialize ViewModel. After removing error and TFS management, this is the code of the powershell command to initialize the active document … Continue reading

Posted in 16868, 17894, 17895, 18440, 8606 | Leave a comment

Extend Visual Studio with NuGet PowerShell commands basis

There are many ways to extend Visual Studio. The most used is to vsix but today, I want to write about NuGet. In most cases, NuGet is used to add a dll reference or update a config file or things … Continue reading

Posted in 17894, 18440, 8606 | 1 Comment

WAQS: CustomAttribute

7 reasons to use WAQS WAQS documentation   Sometimes you want to use many contexts in a service method. Currently Func<IContext> is not supported in WAQS specifications.   Because WAQS generated types are partial, you can extend them. But I … Continue reading

Posted in 16868 | Leave a comment

WAQS: Math.Round

7 reasons to use WAQS WAQS documentation   I recently had a surprise with .NET: Math.Round(3.5) = 4 (expected) but Math.Round(2.5) = 2.   Indeed, by default, Math.Round uses MidpointRounding.ToEven option.   However, SQL Round uses the AwayFromZero mode. So … Continue reading

Posted in 16868, 18204, 7671, 7672 | Leave a comment

How to generate a property from an extension method using Roslyn

In WAQS, we have calculated properties that are generated from extension methods. In this post, we will see how we can generate a property from a method.   In my previous post, we saw a basic method to see if … Continue reading

Posted in 16402, 16868, 17895 | Leave a comment

Roslyn basis

Syntax Tree All the code could be represented as a very detailed tree. Using Roslyn, we can get this syntax tree from a document or we can use Parse methods of SyntaxFactory class. For example, you can use the following … Continue reading

Posted in 16402, 17895 | Leave a comment

Entity Data Model classes

Entity Framework provides some classes to describe the Entity Data Model. This can be very helpful in many cases and particularly for code generation.   Then, Entity Framework provides a ttinclude file that allows us to use this model instead … Continue reading

Posted in 10511, 16868, 17895, 7674, 7675 | Leave a comment

T4 Basis

T4 is a language tags that can be used in Visual Studio to generate file(s) (one file by default). T4 only has 4 tags: <#@ … #> <# … #> <#= … #> <#+ … #> Every thing that is … Continue reading

Posted in 10511, 17895 | 1 Comment

WAQS Querying: Math methods

7 reasons to use WAQS WAQS documentation   Math calculation with LINQ To Entities As with DateTime calculation, Math methods such as Abs, Ceiling, Floor, Pow, Round and Truncate are not supported by LINQ To Entities. With L2E queries, you … Continue reading

Posted in 12253, 16868, 7671 | Leave a comment