-
|
Well the time is here for the Southeast East Valley .NET User Group to hold it first of two meetings to compare different Object Relational Mapper technologies. Some of the representative technologies will be LINQ, nHibernate, LLBGen Pro, and more. The event will be broadcast via LiveMeeting starting at 6:30 PM MST. For more details on the event visit: http://sevdnug.org/Events/2008-07-24/Southeast_Valley_NET_User_Group_Meeting_July_2008.aspx Read More...
|
-
|
I just published my "Locale LINQ" user control... Here are the basic features: - Displays the corresponding States/Provinces based on the selected Country - Includes a pretty exhaustive list of Countries & their associated States/Provinces - Allows for an initial Country or State/Province to be selected via markup or server side code - Caches the list of States/Provinces & Countries for great performance - Based on an XML file containing the list of States/Provinces & Countries - Uses LINQ for all of the data access & queries Check it out: http://www.schnieds.com/2008/06/aspnet-locale-stateprovince-country.html -Aaron http://www.churchofficeonline.com Read More...
|
-
|
We decided to use FilteredViews instead of FetchXml for an internal project, but we ran into couple of problems. You can't access data from the FilteredViews using ASP.NET since it runs under NETWORK SERVICE (by default (app pool)), FilteredViews filter the data by Users. If you set the <identity> settings on the WCF service you'll notice it has no effect, you need to tell WCF to run in asp compatibility mode, check this link for more details. Impersonation needed for FilteredViews - EXECUTE AS doesn't work, some forums suggested we enable DB_CHAINING, TRUSTWORTHY & grant NETWORK SERVICE Impersonate for each User, we decided to take a different route since these database changes are unsupported by Microsoft. - Configuring...
|
-
|
All day I was stumped on why there wasn't a simple way to grab the first object in a sequence other than using: .Take(1).Single Then I discovered the keyword First. I'm still a little puzzled as to why .Single would throw an exception if more than a single element would be returned. I can't really see a practical use for it unless you wanted to force only 1 object being returned. Read More...
|
-
|
The July July and August 2008 meetings of Southeast Valley .Net Users Group ( SEVDNUG ) will host a comparison of different Object Relational Mapper / Data Access Layer technologies. Requirements have been to established so that there is a common database and user interface to compare these technologies against. Each presenter will be given 15 minutes to demonstrate there technology and/or framework followed by a 5 minute Q&A session. At the end of all of the presentations there will be a Q&A session for all of the presenters and attendees. Since we have so many technologies represented, 9 at last count, the event will span two meetings. In addition, if you can not attend but are interested in the event, it will be broadcasted...
|
-
|
We've had the first of our two half days with Steven Sanderson this morning. It was split in half, with the first half covering the new C# 3.0 language features and the second tackling MVC. LINQ We went through some fairly basic examples of LINQ to Objects just to bring everyone up to speed, covering the major language features involved (extension methods, lambdas, generic type inference, automatic properties, anonymous types and the like). MVC Moving on to the real meat of the session now! Steven first covered some of the reasons behind MVC. This includes things like the fact that we have fairly limited control over the rendered HTML with WebForms, a false separation of concerns and that it is fundamentally hard to test. He stressed that...
|
-
|
Version : Silverlight 2 Beta 2 Reading an XML file in an XAP package can easily be done with the help of a helper class like so: 1: public static class XmlHelper 2: { 3: public static XElement LoadDocument( string fileName) 4: { 5: XmlReaderSettings settings = new XmlReaderSettings(); 6: settings.XmlResolver = new XmlXapResolver(); 7: XmlReader reader = XmlReader.Create(fileName); 8: XElement element = XElement.Load(reader); 9: return element; 10: } 11: } Once you have the XElement object, you are free to manipulate it with LINQ to XML as shown below: 1: public static List<Slide> LoadSlides() 2: { 3: XElement element = XmlHelper.LoadDocument( "Slides.xml" ); 4: var slides = from slide in element.Descendants( "Slide"...
|
-
|
In the first part of this series I talked about the fact that Linq to LLBLGen Pro is a full implementation of Linq and why it's so important to use a full linq provider instead of a half-baked one. Today, I'll discuss a couple of native LLBLGen Pro features we've added to our Linq provider via extension methods: hierarchical fetches and exclusion of entity fields in a query. Furthermore some other features will be in the spotlight as well. What I also want to highlight is that using an O/R mapper is more than just filling dumb classes with dumb data: it's entity management , and the O/R mapper framework should offer you tools so you will be able to manage and do whatever you want with the entity graph in memory with as less problems...
|
-
|
Today I needed to load in an XML file into memory for later use. At first I was going to use the XmlDocument library (old habits die hard), but later switched over to the XDocument library. Why, not because one is better (ok, so I think that XDocument is better, but not the point here), but because it caused me less friction (which I guess does make it better). Consider this need. I have a list of XML files on disk and I would like to convert them to a list of XML documents. Below is my original code using the XmlDocument library: ... IList returnDocument = new List< XDocument >(); foreach ( string file in files ) { XmlDocument xmlDocument = new XmlDocument(); xmlDocument.Load( file ); returnDocument.Add( xmlDocument...
|
-
|
While I have finished my series on LINQ to SQL I wanted to talk about some of the reaction. In his summary post of 30 June Roger Jennings mentions his concerns that because the SQL Server Data Programmability group, who are bringing us Entity Framework v1, now owns LINQ to SQL we will not see the kind of development I asked for in my last post of my Architecting LINQ to SQL series . Indeed Matt Warren's comment in this post, that the provider model for LINQ to SQL was disabled before release is troubling for what it implies about internal politics over data access strategies in Redmond and might confirm concerns I had a long time ago . Looking at the the Data Platform team's blogs and site , LINQ to SQL seems almost forgotten. I would...
|