Tag | LINQ Posts

In the years since the .Net runtime was first released I've seen a number of ways of accessing a SQL database from within VB.Net (or C#). One person I worked with had a nifty utility which would take any database and generate all the code to access it. It has been on my list of jobs to do to implement my own such tool but like other jobs, such as winning the National Lottery or winning a high stakes poker game I have never got around to it. OK the poker game is something my wife will have to do - ...
The other night at our local development group, the Charlotte based Enterprise Developers Guild, Brian Hitney from Microsoft gave and Overview of Microsoft ASP.NET MVC. This is my first time seeing the MVC pattern from Microsoft. This is the take away Items from this talk which may be helpful to those that are new to the MVC concept. Routing Before discussing the structure of the MVC pattern, it is important to understand how pages are routed through the MVC. Using a Routing table, links are directed ...
I have been monitoring the site www.x-tensive.com for a while, waiting to see the new release of DataObjects.NET because i have been looking for a very good ORM for .NET, something that would be better than ADO.NET Entity Framework and better than Developer Express XPO and better than CSLA by Rockford Lhotka. One of the main problems i found by using stored procedures (used by Lhotka) as part of the architecture is that they are very limited in the number of parameters they can take. Especially in ...
It’s been almost an year, The "Houston Tech Fest" came again! Contrary to last year, this year there are several Non-Microsoft tracks added to the event. Overall there are 1) 3 .NET tracks 2) 3 Java tracks 3) 2 General tracks 4) a special Silverlight track 5) 1 Security track 6) Alt.net track If you are nearby Houston, this is one of the cool event to attend to know your community. Register now, if you haven't so far! Looking at the agenda, you can see SOGETI presenting in every time slot 11:30 AM ...
Many of you use timestamp in LINQ to SQL because it's easier for us figure out if an object is new or not. This is specially useful when we need to track the state of objects in disconnected/N-tier scenarios. An important thing to note, though, is that the timestamp column is mapped as a System.Data.Linq.Binary property in the LINQ generated object so it is part of the XML serialization when you use the LINQ to SQL objects in Web Services/WCF services. The real problem is that System.Data.Linq.Binary ...
*Moved to: LINQ to XSDAbsolutely brilliant. That's what I think of Linq to XSD. Disappointed that is only works in C#, but having to use C# for a single project out of a solution it is a small price to pay to get the functionality. If you install the LINQ to XSD Preview Alpha 0.2 Refresh you get a couple of extra project definitions:Read more...Follow my new blog on http://blog.hinshelwood.com ...
Introduction I recently starting fooling around with the new XML LinQ stuff in .Net, and it is very impressive. One thing that I found missing was the ability to serialize objects directly into XElements. However, Microsoft did provide the means to get me to hit the ground running and it took a couple of minutes for me to get it right. Readers and Writers One thing the classical .Net XML always lacked was an "XmlNodeWriter", a writer that basically allows you to create DOM XML nodes using a standard ...
I have decided I will be attending DevConnections November 10 - 13th in Las Vegas, NV DevConnections has a number of events running at the same time, with registration, you can attend any of these events - ASP.NET Connections - VS.NET Connections - SharePoint Connections - SQL Connections - DNN Connections - Exchange Connections - Unified Connections - Windows Connections Some of the speakers include Dino Esposito, Rick Strahl, Markus Egger, Robert Howard, Miguel Castro, John Papa, Julie Lerman, ...
Stackoverflow.com is a soon-to-be-released developer community website from Jeff Atwood and Joel Spolsky. It is an evolution of existing sites in the genre, adding reddit and wiki type features to the traditional forum style site. The technology stack it uses is nearly identical to my current personal project: Asp.Net MVC, jQuery, Linq-to-sql, sql 2005. The truly fascinating thing about stackoverflow.com is the buzz. There are already thousands of users on the private beta. I predict, and Joel Spolsky ...
Hi, I am working on LINQ since last few days and I think it is a very interesting technology to work on. Before that I used to work on Subsonic to generate code for my Data Access Layer, now by using LINQ not only I have my Data Access Layer but also a lot of more functionalities. Yesterday I faced a situation where I had to SELECT BETWEEN some values according to my LINQ query. At last I came to the point that LINQ does not have SELECT IN (a1,a2,a3 ...) so I had to do following: int [] data = new ...
So what do you do on a rainy day in Denver? Well, if you are me you will catch up on some blogging and get some other delinquent tasks. I know that I have been hiding under a rock but there has been so much going on. I just finished up a project for a client and next week I am teaching a WSS 3.0 deep dive course at AmeriTeach. Also it looks like I get to catch up on some much needed relaxation. From a previous post Chris Givens, the author of the Advanced SharePoint Developer course, sent me a copy ...
We're shaking things up a bit over here at NINEQuestions.net. My 32nd cousin (she was born a Williams) and temporary co-host Rachel Appel is turning things around and asking me the questions this time. I'll let her take it from here. When I saw Chris doing the 9 Questions series on his blog, I wondered why everyone else got a little shot at web celeb and not the man himself. So I hopped on IM and said “Hey Chris, you’re interviewing everybody, but where’s your questions and answers? You have to dogfood ...
Bill Reiss on Embedding fonts, .net Curry on hosting SL Content, Corrina Barber updated another SL2 skin, Lutz Gerhard on Zooming with constraints, Scott Barnes on offline storage, Tim Heuer on Simple properties, DeepZoom app and general posts. From SilverlightCream.com: Be careful when embedding fonts in Silverlight XAP file Bill Reiss discusses issues surrounding straying from the standard font set, and gets some info from Tim Heuer in the process. Hosting Silverlight Content in ASP.NET 3.5 If ...
Time to cap off the week with another interview. I spent some time with Jim at TechEd (Developers) 2008 and was quite impressed with not only his VB knowledge, but also his enthusiasm for sharing it. If you've ever worked with LINQ, you've probably been to his website (www.thinqlinq.com) at some point. So without further introduction on my part, I give you NINE Questions with Jim Wooley... 1. Where are you from? I've been living around Atlanta, GA for the last 9 years. Most of my formative years ...
Corrina Barber updated Red & Black skins, Mike Snow on Isolated Storage, Tim Heuer on S3 and SL2B2 and making Video Encoder Templates, Azret Botash with IM/Chat client and server, Emil Stoychev with Pivot Table, Bart Czernicki Master Series, Part 1, and Alex Golesh: Isolated Storage, StringToPathGeometry Converter, Init Params, Communication between two objects, Treeview Control and reflecting ScriptObject content. I want to point out to all the bloggers that there's a new blog-scraper in town. ...
Mark Monster on SL Networking (2), Andy Beaulieu on finding XAML elements, chrishayuk with SL2 Wee Mee, and Mike Snow Animating a rotating image and setting browser cookies with SL. If you don't know who Chad Campbell is, shame on you... and a big hint --- he's NOT my son! Chad's been working on a great Silverlight 2 book for quite a while and soon we're all going to benefit from his undertaking. Moving in that direction, Chad is going to have a Halo 3 discussion of his book, feedback, and discussion ...
Fons Sonnemans with RollMenu, Frank LaVigne with Community Megaphone SL Map, Martin Mihaylov on LINQ to XML in SL2, John Stockton with What is Silverlight, and How to Learn it, Felix Corke on Designing a SL2B2 skin, Michael Washington with Silverlight Notepad, Michael Scherotter with IE8 Forward/back in SL2, Expression Blend Team resource links for VSM, and Tamir Khason on Actual Width/Height. Yes boys and girls, this is what happens when you take a weekend off from blogging ... so I'm posting this ...
So we had out July meeting for the Bartlesville .NET User Group. It was an amazing meeting! If you have never seen Zain Nabousli speak then I suggest you try attend the next live event he is speaking at our check out his webcasts. Zain is a very dynamic speaker that keeps even the most sceptic of people fully engaged and entertained. The content of his presentation was LINQ with Visual Studio 2008. Zain's presentation was very to the point and very informative, and exactly what the audience had hoped ...
I don’t profess to be an expert. But I have been using this technology in my current project. The typical, understaffed, hurry up and learn, show me something, release it (and yes it must be validated, but doing so is your problem). Here’s what I’ve picked up while coding shotgun style. Table names and Field names should always be different. When table names and field names are the same, LINQtoSQL renames the field name with a name1. Then when you have a table with a field name that’s a foreign key ...
I've been using the new SQL-LINQ feature in ASP.NET and recently came across the following error message when calling a stored procedure from the SQL to LINQ data class: "The required column <ColumnName> does not exist in the results" The strange thing was this seemed to work fine when I called the stored procedure directly in SQL, but threw an exception when called in C#. After a night's sleep, I figured out what the problem was: The stored procedure was pretty meaty but basically the following ...
One of the best things about LINQ to SQL is that is really does have solid support for stored procedures. However, it's not quite as friendly as dynamic LINQ to SQL with scalar values because you can't take advantage of anonymous types. Instead you must return an actual known type. Furthermore, this can't be a primitive so you can't return string or bool directly. You also can't use a class that doesn't have a default (parameterless) constructor so that also rules out nullable types like Nullable<bool>. ...
It is a well-known principle of software design to have minimal coupling between abstractions. Twenty years ago, this dialogue would have not made sense to me. Although, object-Oriented Reengineering remains an interesting research field with lots of problems to be solved and with plenty of possibilities to interact with other research communities (Agreeable Concatenation looks at this topic in a different way). In spite of this, to be fair, this story is similar to the one told when components first ...
Koen Zwikstra on Declarative Tweening, Emil Stoychev on Data Conversion/Binding, chrishayuk on ContentPresenter, Tim Rule with WebClient and LINQ, Tamir Khason's SL presentation materials, Michael Sync on Best of SilverlightCream, SL2B2 Updates and SL2 writing contest extended, and Tim Heuer on .Net Coffee Break. From SilverlightCream.com: Declarative Tweening Koen Swikstra put together a great article on tweening and Silverlight, and goes on to define some attached dependency properties that allow ...
This Sunday, I went to dotNETwork 5th gathering to see how interesting it would be to have some Silverlight fun followed by SOA and Patterns and Anti-Patterns goodness. It was a really fun day, and here comes its writing as I saw it. Starting Out (No tech – you can skip) The day started by meeting Mohamed Samy (the SOA guy, and my friend!) at 10 AM, getting some sandwiches (and coffee for me as I didn’t have sleep the night before), then, going to the buses place in El-Sekka club (as neither of us ...
LLBLGen Pro uses operator overloading for a really cool purpose - to emulate LINQ in .NET 2.0 when it comes to specifying predicates. With LLBLGen Pro, you can specify predicates for filtering data within the database, which isn't the same as retrieving all the data to the application server and filtering it with a DataSet. Most projects today are still based on .NET 2.0 because management is too skeptical about the benefits versus the costs of moving to .NET 3.5. That's where LLBLGen Pro helps make ...
Currently I'm working on a data synchronization tool in which I have finally had the need to use reflection. I'll admit that I'm not an expert when it comes to reflection, but it isn't that hard to work with either. And I have heard before about the performance hit you take with reflection, so up until now I hadn't ever needed / wanted to use it, but I see now the power that reflection offers. One day while perusing my RSS feeds for the day I was reading one of Scott Hanselman's weekly source code ...
Jaime Rodriguez on DeepZoom, Pete Brown on on Publish/Subscribe pattern in SL, Shawn Wildermuth on XAML Controls, Tim Heuer on new Videos, Bill Reiss on SLStreaming, Philip Beadle on File Uploader, Adam Kinney with updated GamerCard, Brad Abrams focused on Data, Scott Barnes on DeepZoom, SilverlightSDK on MSDN Searching, Mike Snow on SL Transparency and SL Policy Server. From SilverlightCream.com: Working with Collections in Deep Zoom. Jaime Rodriguez almost snuck this one by me, but I caught it ...
I conducted a Webcast last week on Thursday, June 19th 2008, with Gunther Lenz. Some of you might have been able to make it. We had a great turnout for the event. Here's the info... Webcast Title: "Composite Rich Internet Applications" You can check out the Course Details at the following link: http://www.isvinnovation.co... Course Description: Join Microsoft’s Murray Gordon and Gunther Lenz for an informative webinar on the Composite Rich Internet Applications. ...
I have been tasked to give a presentation on technology tomorrow, to an audience which has not been exposed to software development and i'm wondering what i should talk about. My area is software engineering and technology as a subject is very wide, i'm limited to computer technology. Maybe i should talk about new computer devices, or probably some new things the C#2008 with .NET 3.5, or maybe some things i expect to use in the VS2008SP1? Oh... Its so difficult because my mind is mainly filled with ...
I mentioned a while back that I had something I was working on that involved a change in language, actually a pretty radical change. I have been working on vocational project written in VB.net and made heavy use of LINQ to SQL. I wasn't sure of LINQ to SQL for anything else other than RAD and to be honest I'm still not. Anyway, I'm not getting into that debate. Needless to say I went all the way and don't use a single sproc in this project. Some of you will know I play cricket every Saturday for ...
Michael Washington's Silverlight Desktop, Peter Bromberg on Data, Jesse Liberty on new interface, chirshayuk with 3-parts on encryption, Celso Gomes with Grand Piano, 360 Degree View, and Panoramic Viewer, Joel Neubeck with Media Player with Marker Support, Scott Barnes on Binding to Custom Model, and Pete Brown on SL2B2 and RSS. Karsten Januszewski has ported his samples to Beta 2. Silverlight Girl reports that she continues to find more Silverlight B2 games, and is keeping her list up-to-date... ...
To set a normal text box in the MVC framework, the most typical code would look like this: 1: <%=Html.TextBox("FirstNa... ViewData.Model.Contact.Firs... The key here is that you should set the name of the textbox to be the exact same name of the property name. If you do this, then it enables you to use extension methods such as the UpdateFrom() method to automatically populate your object from Request.Form parameters when you post to your controller action. This is all well and good but ...
improve my => 'code' I was just reading Jeff Atwood's recent blog article Department of Declaration Redundancy Department He makes the case that writing code without static typing is easier to read, and "Anything that removes redundancy from our code should be aggressively pursued -- up to and including switching languages." My take is "maybe". Say I have a class named Example that implements two interfaces, IFoo and IBar. When I instantiate I have several options when dong so statically. Example ...
I’ve been recently using LinqToSQL with a current project and finally got down to business where I needed to work with fields from multiple tables. LinqToSQL is nice, but it does have it’s drawback that it maps objects directly to the schema. Fortunately, it maps their relationships too. Let’s avoid the discussion of LinqToSQL pros and cons for now and figure out handling multi-table fields. Did I mention I’m using the LinqDataSource? Oops… that too. I’m not a fan of the built in sqldatasource and ...
Here's an example of looping through Form textboxes using VB LINQ and disabling the boxes: Dim formBoxes = From formControls In Form.Controls _ Where formControls.GetType() Is GetType(TextBox) _ Select formControls For Each oBox In formBoxes CType(oBox, TextBox).Enabled = False Next ...
A byproduct of XAML’s expressivity and comprehensiveness is true separation of user interface and business logic. Because configuration files are XML documents, extending the integrated configuration system means extending the XML schema of the system, refer to Waterfall model. many programmers out there just change the behaviour of their program instead of improving the code. At the core of Spring.Net is the concept of Dependency Injection, otherwise known as Inversion of Control. At run time, XAML ...
· Everything You Wanted To Know About MVC and MVP But Were Afraid To Ask · Functional Programming in C# 3.0: How Map/Reduce/Filter can Rock your World · MbUnit 2.4 - Avoiding Crappy Data Resulted From The Test · Managed Extensibility Framework · IronRuby at Tech Ed 2008 · Velocity: A Distributed In-Memory Cache from Microsoft · Must See WF/WCF Influencer MSDN Webcasts · WCF Webcast Series (Old but good) · Using CSS to Fix Anything: 20+ Common Bugs and Fixes (Found by Mohamed Tayseer) · A jQuery Client ...
The First Bi-Annual SharePoint Camp held on Saturday, June 14 was a huge success. We had over 181 people registered to attend and we had over 140 show up on a beautiful Saturday. We had one of our first beautiful weekends in MN and people still opted to attend the camp instead of being outside! We had over 20 presenters volunteer their time, including two Microsoft reps from Redmond on the SharePoint product team. A couple of issues during the day came up, including a broken air conditioner for the ...
The following is a response to the forum question posted here. I had the opportunity to meet Scott while at the Little Rock .Net User Group, and we talked briefly about my thoughts on how to take advantage of the programs available to software startups. In particular Scott owns a consulting business and he's having growing pains. Scott's problems is very typical of thousands of small business consultant shops. He's busy being the business owner, full time consultant/programmer, bookkeeper, marketing, ...
A bit of a late announcement - I'm just returning to a schedule after my son was released from the hospital last night. This month’s meeting will start off with Pizza and then break into "The Adventures of Linq". Linq (or Lanquage INtegrated Query) is a new feature of the .Net 3.5 runtime that provides an elegant mechanism for querying data from within C# & VB.Net code. In this session, we'll move past the basic examples that occupy most introductions to Linq and examine the new .Net 3.5 functional ...
Code debugging is one of the most important parts of any development life cycle because it gives you the technique to find the problem and how to resolve it. When we talk about the visual debugging Visual Studio has tremendous potential in the term visual debugging features in the form of DataTips. DataTips tool provide a handy way to view information about your variables in visual studio during debugging only. In old versions of Visual Studio DataTips were limited in the amount of the information ...
The Microsoft Community event had a great opening today at the Orlando Convention Center where Tech Ed has been going on all week. As I arrived and drove past the convention center, I noticed the lack of Microsoft advertising outside the building. In past years, you would see Microsoft plastered all over the place like on busses, light poles, and outside the building. I wasn't sure why. What was nice about this event was that Joe Healy, the Florida Microsoft evangelist, was all over the place making ...
Tech Ed 2008 has been great so far. I've spent a fair amount of time at the VB.NET booth, talking to folks, answering questions and also hearing about some the cool stuff they've been doing in VB.NET. Lots of LINQ questions so far. Also caught some excellent sessions, including: getting published writing on "MS technologies", "XNA 3.0", "Silverlight" and "UX: Selecting the right technology." I also got a chance to chat with Brian Noyes, the author of the ClickOnce book I've been using on my current ...
I had too much content for a blog post, so I posted a full article to code project:

http://www.codeproject.com/KB/architecture/linqrepository.aspx
Oop .NET Framework Client Profile was a great reply from .Net team because it’s full fill the need of those customers how are wary and ask questions from Microsoft for small .Net framework for its client application deployment. One thing that I want mention here is .Net Framework Client Profile is a subset of .Net 3.5 and it’s available in .Net Framework 3.5 SP1. Download .Net Framework Client Profile is came into begin with following things keep in minds. Small framework runtime. Smart, faster application ...
I am glad to announce that we have winners of Central and Eastern Europe of “Win The Web and Discover Yourself!” contest in 2008. And the winners are: Best Student Team: HP Team from Poland (89 points) Prize: 3 free tickets to TechEd in Barcelona ! Best Company: Team Carnation from Hungary (91 points) (I don’t have image. Send me If you have any.) Prize: engagement with the Microsoft Innovation Center team in Copenhagen! About contest Challenge took place almost two weeks ago (17-18 May) and consisted ...
Attached Properties by Illa Iordanov, Animating ListBox Items by Ivan Dragoev, Programmatic DeepZoom by Jonas Follesø, Computer ArtsProject by Mike Ormond, and Ronnie Saurenmann on WCF, LINQ, CRUD, and Large DataSets. A couple editorial comments up-top: Andrew Duthie has posted a link to what looks to be a good WebCast by Frank LaVigne on "Graphic Design for Devs" today Wednesday at 12 noon Eastern... so that's pretty soon! Go to Andrew's Post for the info -- sorry for posting that it was Tuesday ...
Imagine that every project in codeplex had to be decomposed into codeplex hosted unit tested functions which complied to some xunit standard - that would go along way towards code reuse, and move away from reinventing the wheel. worked on 2 Silverlight projects recently - see screenshots: and Last 3 months learned the following: NET Components revise – reread Yuval Loweys book – revised best mechanism for interface usage, delegates (circa .NET Framework 2.0), threading. The Interface stuff leads ...
Exception: System.ObjectDisposedExcept... Cannot access a disposed object. Object name: 'DataContext accessed after Dispose.'. This can occur when using Linq to SQL to retrieve data from a database - and when you try to access data after the data context object has been disposed. More specifically, the exception occurs when trying to access an item that has not yet been retrieved from the database and the data context object has been disposed. This often occurs when using a variable, that was populated ...
I have a situation where I want to use a transaction to keep track of a particular message process in order to roll back various parts if there is a failure. The service operation is listening on a queue using the NetMSMQBinding and the operation is marked with the transaction properties of the OperationBehavior like so: <OperationBehavior(Trans... Public Sub SendHello( ... Using the above attribute enables the operation for transaction ...