View Complete Post
I have never tried a group by with linq, now I do and I'm stuck.
I try to convert this sql statement to its linq counterpart :
SELECT COUNT(tb_Mailer_Smses.Id) AS [cnt], tb_Mailer_mailing.Id As [Id]
,SUM( CASE WHEN tb_Mailer_smses.DLRStatus = 200 THEN 1 ELSE 0 END) As [Delivered]
,SUM(CASE WHEN DLRStatus BETWEEN 300 AND 499 THEN 1 WHEN DLRStatus BETWEEN 800 AND 899 THEN 1 END) AS [Errors]
FROM tb_Mailer_mailing INNER JOIN
tb_Mailer_Smses ON tb_Mailer_mailing.Id = tb_Mailer_Smses.MailingId
WHERE tb_Mailer_mailing.ApplicationId = 1
GROUP BY tb_Mailer_mailing.Id
Is there some one who can me show me the convertion process ?
I created a getter and Setter in Visual Basic. I have some questions though. Please look at the code below.Here are my questions.
A.) At line 1 below, should "pieces" be declared as Private?B.) In the IDE at lines 4 and 7 the IDE keeps changing those variables to uppercase so that the property name "Pieces" is the same as the variable name "pieces".Should I instead define the integer pieces with an underscore: _pieces ?That is the only way I can get around the IDE forcing the variable to become uppercase.
1 Dim pieces As Integer
2 Public Property Pieces() As String3 Get
4 Return pieces5 End Get
6 Set (ByVal values As String)7 pieces=value8 End Set9 End Property
Fault injection testing is the process of deliberately inserting an error into an application to determine whether it deals with the error properly. We'll explain how you can introduce faults into .NET applications at run time using the Managed Code Fault Injection APIs of the TestApi library
MSDN Magazine August 2010
A common software-development task is generating a graph from a set of test-related data. But if you're doing it by hand and the underlying data changes frequently, this particular task can become quite tedious. James McCaffrey shows you how to automate the process using Windows Presentation Foundation technology.
MSDN Magazine June 2010
Understanding combinations and permutations is a fundamental skill in software testing. We show you how to work with combinations and permutations using code written in the new F# language.
MSDN Magazine May 2010
Silverlight greatly simplifies the process of building rich Web applications, and we'll walk through an example of using Messages as a quick method of interactively testing simple Silverlight apps.
MSDN Magazine March 2010
There are many ways to test WCF services, but the socket-based approach is flexible and very useful for security and performance testing. We show you show you how to test a WCF service using a network socket based approach.
MSDN Magazine February 2010
MSDN Magazine January 2010
Creating and maintaining a unit test suite for legacy code can be a challenge. Pex automatically produces a small test suite with high code and assertion coverage.
MSDN Magazine December 2009
In this month's column, James McCaffrey explains exactly what pairwise testing is and provides you with complete C# source code for a production quality pairwise testing tool named QICT.
This column presents an approach to Antirandom (AR) testing the author calls partial AR string testing, which can be used to test a wide range of software systems.
MSDN Magazine October 2009
This month we show you how to use F# to perform HTTP request-response testing for ASP.NET Web applications.
MSDN Magazine July 2009
Use Test-Driven Development with mock objects to design object oriented code in terms of roles and responsibilities, not categorization of objects into class hierarchies.
MSDN Magazine June 2009
This month we demonstrate how easy it is to use IronPython to test .NET-based libraries.