| |
|
|
mcp111
: On
March 04, 2008 5:32 PM
said:
|
This is a great overview but I'm not really clear if LINQ is going to simplify my programming. Seems to be more complicated than SQL. I would also like to comment on the download links presentation. You have them as "WMV WMV", etc - initailly I thought it was some kind of typo but when I hovered over them I found that one was for C# and the other was for VB. You need to present things in a more "user-friendly" manner with neat sub-headings as VB downloads and C# downloads so it is clear and neat!!!
|
|
|
|
pfdpereira
: On
March 05, 2008 7:10 AM
said:
|
just one question! where can i get the password for video zip files included in this page available to download? thanks, Paulo Pereira
|
|
|
|
mcp111
: On
March 05, 2008 11:54 AM
said:
|
When you post the comments on this website it would be more correct to say "On March 04, 2008 mcp111 said ... " You have the order all mixed up and it doesn't read well.
|
|
|
|
mcp111
: On
March 05, 2008 3:22 PM
said:
|
Actually I'm not sure why you have the audio downloads section. For a demo video is a must!
|
|
|
|
Freon22
: On
March 19, 2008 4:08 PM
said:
|
I agree somewhat with mcp111 as far as simple queries, updates, or inserts. But I see Linq being a great help on complex queries, updates, and inserts. Not sure yet if using Linq will be any faster at run time. Has anyone tested to see if the runtime is the same as with writing your own t-sql statement. Anway good job so far on the videos.
|
|
|
|
igavemybest
: On
March 29, 2008 1:19 AM
said:
|
I actually just upgraded to VS2008 just for LINQ because I am doing a project that has extremely complicated SQL staments that are based off of variables that change depending on other changing variables, and on and on. I alway thought it would be so easy to do in VB. Well, now I can, freakin awesome! And by the way... runtime seems to be just as quick becuase all the SQL codebehind is actually there
|
|
|
|
Freon22
: On
April 02, 2008 11:15 AM
said:
|
I do have one problem with Linq! It does not seem to have a easy way to handle null returns. Like a user types in his login name and password but he made a mistake while typing his password. Now when you run the linq query it will not return anything and will throw an error. I have tryed the DefaultIfEmpty and a few other default types. Now I maybe coding it all wrong? Don't really know because there is not much infor, available on the net yet. Maybe someday someone will post some examples on how to work around these simple but painful errors. So if you want to use linq with a gridview, dropdown list and so on then Linq is great. But if all you want to do is to check a few values in a database or check to see if they are even in the database. Then save yourself the headache and use a t-sql query.
|
|
|
|
Freon22
: On
April 02, 2008 10:55 PM
said:
|
Yesterday was not a good day, it seemed that I could not do a simple query that may have a null return. A few kind coders showed me where I was messing up. The funny thing about this is at one time I had it right. But for some unknown reason I failed to see it working when I tested it. So I moved on to trying to do it wrong again. lol I guess after seeing errors on every try I missed it when it worked. So I want to show a simple example on how to handle a null return or I should say how I needed to handle it in my code. In t-sql we could always use the reader.HasRows but in Linq you need to use DefaultIfEmpty, SingleOrDefault, or one of the other Defaults. registerDataContext db = new registerDataContext(); var users = (from user in db.userAccounts where user.email == TextBox1.Text select user).SingleOrDefault(); //Check if users is null. if (users != null) { Label1.Text = string.Format("<h2>The email address <font color='red'>{0}</font> already exist!</h2>", TextBox1.Text); } else { Label1.Text = string.Format("<h2>The email address <font color='red'>{0}</font> does not exist!</h2>", TextBox1.Text); } Another way of making this same query is. registerDataContext db = new registerDataContext(); userAccount users = db.userAccounts.SingleOrDefault(p => p.email == TextBox1.Text); if (users != null) { Label1.Text = string.Format("<h2>The email address <font color='red'>{0}</font> is already exist!</h2>", TextBox1.Text); } else { Label1.Text = string.Format("<h2>The email address <font color='red'>{0}</font> does not exist!</h2>", TextBox1.Text); } I hope this may save someone else from pulling out their hair.
|
|
|
|
|
|
|
|
fher
: On
May 15, 2008 10:23 PM
said:
|
For some reason the sample code in the Default.aspx file first line reads in part like this: CodeBehind="Default.aspx.vb" Inherits="LINQPart1._Default" But the sample code also includes a “Default.aspx.vb” file which handles the vb code, in order for the samples to work and be editable change that to something like: CodeFile="Default.aspx.vb" Inherits="_Default" That is if you want to do the very same thing Scott is doing and follow along
|
|
|
|
Aditya640
: On
June 04, 2008 12:05 PM
said:
|
I have a problem:- After learning linq. I thought about testing it.. I have a table with the following fields. name[..varcher(50)..notnull] title[..varchar(50)..notnull] id[..primary key..increment +1..int] I have a linq to sql classes named dataclasses.dbml here is my query Dim db As New DataClassesDataContext Dim p As New testing With {.name = "ad", .title = "adi"} db.testings.InsertOnSubmit(p) db.SubmitChanges() Here is my error.. It crashes on db.SubmitChanges() With this error... The null value cannot be assigned to a member with type System.Int32 which is a non-nullable value type. Please help.
|
|
|
|
jobejufranz
: On
June 27, 2008 5:50 AM
said:
|
I think Scott forgot one of the most important thing... How to setup and configure your "LINQ TO SQL Classes" to connect to the DB.
|
|
|
|
|
|
|
|
Hamza_zarar
: On
July 26, 2008 12:26 AM
said:
|
very good tutorial for the beginner.
|
|
|
|
suryabeniwal
: On
August 02, 2008 2:30 AM
said:
|
i have problem to update first record ?
|
|
|
|
|
|
ashrafur
: On
August 26, 2008 7:08 AM
said:
|
Nice one for the beginner, thank :)
|
|
|
|
aliuos
: On
September 10, 2008 4:37 AM
said:
|
|
|
|
|
|
hphamvan
: On
September 23, 2008 11:26 AM
said:
|
|
|
|
|
|
|
|
|
|
beaudeep
: On
December 13, 2008 10:47 AM
said:
|
Very Good I'll Start Now :)
|
|
|
|
edwardkieran
: On
December 18, 2008 4:55 AM
said:
|
I have downloaded mpeg-4 (c#) video first and there appeared a blanck screen after 5:12 minutes, then downloaded 3gp version but the same thing happened at exactly the same minute. How come were you able to watch the whole video sequence?
|
|
|
|
edwardkieran
: On
December 24, 2008 9:02 AM
said:
|
Well, I am rather uneasy at the moment. My windows (Vista Ultimate) crashed down when I clicked watch "C# video" link!
|
|
|
|
dotnetruler
: On
January 07, 2009 12:05 PM
said:
|
Very Good tutorial for people who want to get into LINQ... I liked it very much..Keep rocking Scott :)
|
|
|
|
dotnetruler
: On
January 07, 2009 12:08 PM
said:
|
and I have a small Q... Suppose i am using linq and writing some query in C# and in feature after i deploy my website .. i need to change my query .. in this case again i have to compile the whole code and redeploy it again right? but with the stored procedure i can change it at the database and no need to recompile the app right? or am i missing anything?
|
|
|
|
AsifAshraf
: On
February 11, 2009 4:36 AM
said:
|
I need to know that When you created an anonymous type like new {x,x,x,UnitPrice=p.UnitPrice}; i knew that the type is basically displaying some properties of 'Product' Entity. Now is there ANY way we can cast this shortly constructed anonymous type to the Product class object like Product p = db.Cast<Prodct>(anonymouClassInstance); that would really slick haan? thanks
|
|
|
|
AsifAshraf
: On
February 11, 2009 4:42 AM
said:
|
Oh! yes! I think you might say that we can select product entity rather than anonymous class in "SELECT" phrase in LinQ syntax so that it will return the product entity rather than the Anonymous type.... BUT I think first getting anonymous type is BETTER because if you check the "Select" statements in SQL Profiler when you use both ways i.e. one time select the product entity and second time an anonymous class then you come to know that the sql profiler will tell you that it ran the Select statement for ALL the columns in product table for the first time and SOME Columns on second time(i mean when you choose to create anonymous type then SQL STATEMENTS are run only for specific columns of data instead of the whole row, which is performance wise better than choosing the whole product entity). Now the question is there like is there ANY way we can cast this shortly constructed anonymous type to the Product class object like Product p = db.Cast<Prodct>(anonymouClassInstance); Thanks
|
|
|
|
|
|
subandran
: On
March 19, 2009 11:58 PM
said:
|
Excellent Video for Beginners like me..
|
|
|
|
abhinandanbansal
: On
April 06, 2009 5:41 AM
said:
|
For beginners this video is good....
|
|
|
|
Jim Taliadoros
: On
May 13, 2009 6:40 PM
said:
|
In answer to dotnetrulers question on the 7th of Jan 08 about changing queries once the code has been deployed.... if this is something that is likely to happen often, say because your business logic gets updated often you can still use Stored Procs with your dataContext object. In the designer for you datacontext you can select a Stored Procedure and drag it on the right of your designer...which should bring up a dialog box for configuring your datacontext to use stored proc. I think one of the other videos in this series explains how to do that.
|
|
|
|
mabra
: On
May 23, 2009 9:20 AM
said:
|
Hi ! First, thanks for the video. But it does not help. If you are new to asp.net and wish to start with Linq, how comes the northwind into the project?? So, the video starts somewhere in the middle, that's, why it becomes useless. More articles with downloads would be great.
|
|
|
|
zeyzone
: On
October 04, 2009 4:23 AM
said:
|
Thanks Scott . good lesson
|
|