/Home /Archive /Syndicate /Blog /Support /About /Contact  
All Visual Basic Feeds in one place!





In this earlier blog , I introduced the basics of creating an Entity Data Model (EDM) and using LINQ to run queries against it.   In this article, I want to look at how to create queries that will pull  data from more than one table.  In other words, the LINQ to Entities way of accessing related data that would require the use of INNER JOINS if you were using SQL queries. Extending the Model To keep things simple, the original EDM contained mapping to just one table in ... [ read more ]
In case you’ve missed it, Lucian Wishick from the VB team is doing a set of blog posts about feature ideas for future versions of VB (VB11 and later).  Lucian assures me **ALL** of the ideas in my previous wish list for VB10 are on the list !!!! Now’s a great time to speak up and discuss these and other features you might have in mind.


Today we revamped some of the Visual Basic Developer Center Learn pages with more content that allows you to pivot on more fine-grained topics and tasks related to Visual Basic programming. We’ve started with the Introductory Topics and Language Syntax pages. To get there, head to http://msdn.com/vbasic and then click the Learn tab . There you will see a set of general topic areas to explore.   If you select Introductory Topics or Language Syntax you will be taken ... [ read more ]


Somebody asked me to create a starter sample intended just to show the absolute basics of using LINQ, Entity Framework and a SQL Server database, so this is it.   I’m using VS 2008 for this demo. All I’m going to do is to connect to the Northwind database, create an Entity Data Model and then run a query against that model to fetch some data.   Setting up the Data Connection If you already have this connection set up, you can of course skip this section. &n ... [ read more ]


Visual Studio 2010 is almost out the door. Now is a good time to look back at what we didn't get into the language in this release, but would have wanted to, and so will consider for future releases. Over the coming weeks, each day, I'll blog on blogs.msdn.com/lucian about the ideas on our wish-list, along with our evaluation of them. We have our own thoughts about what are the priorities for the VB language. You'll have your own thoughts - please tell us! The ser ... [ read more ]


One of the overlooked or simply misunderstood features of the VB language is calling a function which has a ByRef parameter.  Most languages support only a single method of passing parameters by reference [1], that is the scenarios directly supported by the CLR.  The CLR has a lot of restrictions on the type of values it supports for ByRef parameters and these restrictions get in the way of VB’s goal to be a flexible language that strives to get out of the way of the user.  Hence ... [ read more ]


Introduction In this earlier blog , I showed how to create a simple transition effect of moving an Image into view from left to right.   This time I’m going to tweak that example by adding some additional Images and daisy chaining animations.   Adding a Second (Visible) Image The first change I’m going to make is to place a second Image in the StackPanel.  This Image will be overlaid by the Egg Timer image when it animates.  Here is the markup ... [ read more ]
There’s a new function in VB 10 called CTypeDynamic . ( note it is a function not a keyword so the Microsoft.VisualBasic namespace needs to be imported ) The CTypeDynamic function looks for dynamic information and performs the cast/conversion appropriately. This is different from the CType operator which looks for static information at compile time or relies on the types being IConvertible etc.  For example, consider the following simple class with a custom narrowing operator to Str ... [ read more ]


A while back, I remember being asked if there was a simple way to expose a source XML document as an object with properties. That is, if the root XML element had a child element <Name>Doug</Name> , then the object would have a Name property that was a string and returned “Doug”. The catch was that the XML document did not conform to a specific schema. Hence, you could not simply create an object with a Name property, because you did not know if the source document h ... [ read more ]


One of my favourite lines from The Simpsons is where Homer says, “Doh, every time I learn something new I have to forget something I know to make some room in my head!”.     When I find myself making repeat mistakes that I made years ago, I know just how he feels.   Here’s one that came back to bite me, which might help you if you’re currently sat staring at the above error message in Visual Studio. While trying out the drag and drop dataset ... [ read more ]


Suppose we want to create a class or structure that represents an angle (of type double) between –360 and 360 degrees. Traditionally, we would create a new class or struct defining its behavior and initialize it with the “new” keyword. C# Angle myAngle = new Angle (23.4244);   VB.NET Dim myAngle As New Angle(23.4244)   However, sometimes it can be more intuitive if we can initialize the type by simply providing the ... [ read more ]


This is the continuation of the deeper look into the MSDN EF Quickstart.  Part 1 is here.   5.   Querying Entities and Associations a.   To query the departments in the School database Step 2:   ' Create an ObjectContext instance based on SchoolEntity. Private schoolContext As SchoolEntities Although the previous section tells you that generating the EDM:  “Creates a source code file that contains the class ... [ read more ]



Forum Discussions
.NET / .NET Newbies
.NET / .NET General
.NET / .NET 2005
.NET / VB.NET
.NET / C#
.NET / ADO.NET & XML
.NET / Reporting.NET
.NET / ASP.NET
Visual Basic 6 / VB6 Newbies
Visual Basic 6 / VB6 General
Visual Basic 6 / VB6 Controls & ActiveX
Visual Basic 6 / VB6 & Databases
Visual Basic 6 / VB6 & Reporting
Visual Basic 6 / VB6 & WinAPI
Visual Basic 6 / VB6 & Web Development
Visual Basic 6 / VBA
Visual Basic 6 / eMbedded Visual Basic
Visual Basic 6 / Graphics, Games, Multimedia
© 2005 Serge Baranovsky. All rights reserved.
All feed content is property of original publisher. Designated trademarks and brands are the property of their respective owners.

This site is maintained by SubMain(), a division of vbCity.com, LLC