Chapter 8 was a pain in my ass. The book didn't explain that I had to import System.Linq into my aspx.vb file as well as reference System.Linq in my project. Without the System.Linq my aspx.vb files can't query the data.
After long hours of web searching and trying to figure out what was going on, I fixed the problem.
This chapter works with lots of VB scripting. I believe I have finally obtained a strong understanding of VB syntax. I can read written code very well, now, but I am not sure that I can code it without referencing existing code. This, however, isn't a problem. I learn to code by referencing examples then playing with the syntax.
This chapter was almost exactly like the last chapter, but more focused on the SQL side of Linq. This was most apparent with the VB code where you create a variable to act as a Database holder, i suppose is how it works, based on the data that I put into my project from the database I connected to it, and then call methods associated with the database object that act as insert and delete, update and what not variables. You then take those variables and do a SubmitChanges() that takes all the floating variable associated with whatever database object you are working with, such as db.SubmitChanges() and actually updates the database.
Its kinda a mind screw having to think about initializing a database as an object just to pull the data out and work with it. Then having the SQL commands be handles as variables which i guess are more like objects that inherit from the database object and have values that you provide when you create them. Its very similar to having to learn to transpose music when you sight read, you go little weird in the head until you understand it.
Friday, February 13, 2009
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment