I have a few questions about:
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
Edited by Nancy Michell
MSDN Magazine June 2002
MSDN Magazine March 2002
Hello,I'm fairly new to ASP.NET and i'm using the Membership Provider. I have the need to do similar to some banking sites. Baically I need to track "authorized" computers/ip's for a user. If the user accesses the site form a recognized Computer/IP then the user is allowed into the app after successful login. If the computer/IP is not recognized I need to redirect them to a screen to answer the security question setup in fhte Membership Provider.Has anyone done anything like this or can anyone point me to any examples? I did a search, but can't seem to find anything.
My idea is to maintain a list of authorized computers/IP addresses and check them on initial login. If the IP address isn't found I can redirect them to the questions. My concern is that they are then actually authenticated and could enter any of the site URL's as an authenticated user.
Any suggestions greatly appreciated.
1. Do you have to setup cascading on the SQL server also, or if you setup Cascading in EF 4 that will do it for you, and you can keep Cascading in SQL not setup?
2. Is there any problems I should be aware of like the problems(yet manual fixble) with using Cascading in EF 4 , MVC 2, SQL 2005.