|
|
July 2006 - Posts
-
I am taking a break from LINQ/C#-related posts for a littler detour. Today I attended Chris Anderson's talk about " The Long Tail ". We often have authors of interesting technical/business/organizational books visit the campus as a part of their book promotion tours. In a nutshell, the author generalizes the Amazon/Netflix phenomenon to hypothesize that the future of commerce and culture is not in the mass market hits but in the long tail of the distribution - the ability to sell and buy the large Read More...
|
-
Hello, I am using the May CTP of LINQ and I was wondering if anyone had found a good way to perform outer joins using DLINQ? Also has anyone found a way to emulate the following join syntax using DLINQ (using multiple join limiters on the same join)? SELECT f.blah FROM foo f LEFT OUTER JOIN bar b ON f.a = b.a AND b.Active = 0x1 Thanks in advance! - Grant Read More...
|
-
A question for the DLINQ team... Is it possible to have SubmitChanges and RejectChanges on the Entity level rather than only on the DataContext level? Consider the scenario where in my DataContext i have a Table called Persons with Person entities. Suppose I want to be able to bind the properties of a Person entity to a form for editing, but still allow the user to cancel out of editing the person object... the only way to support the cancel operation is to call DataContext.RejectChanges (which rejects Read More...
|
-
Yesterday I posted about the Xml literal support within Visual Basic 9.0 and how it has me envious of VB.NET programmers . While Xml literals are the most notable language feature available in VB (and not C#) there is one other language construct that is also unique to Visual Basic, Xml axis properties. The XLinq API provides several core extension methods that developers will use when querying Xml using Linq. The most notable extension methods are Elements and Attributes. Elements returns an IEnumerable<XElement> Read More...
|
-
When I try to use the linq query result from DB and bind to the Asp:DetailsView, I got this exception, seams the EntitySet is not remarked as serializable. Server Error in '/Portal' Application. Type 'System.Data.DLinq.EntitySet`1[[Polease.Enterprise.Model.Account, Polease.Enterprise.Model, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]]' in Assembly 'System.Data.DLinq, Version=1.0.2319.19044, Culture=neutral, PublicKeyToken=null' is not marked as serializable. Read More...
|
-
Soma recently announced the name changing of several Linq related technologies . As part of the renaming effort XLinq became Linq to Xml. Although Linq to Xml makes sense as a name for a chunk of the Xml related functionality within Linq it doesn’t fit for everything. The new lightweight Xml programming API can be used outside the context of Linq and has been left nameless. Perhaps we should keep calling the Xml Programming API XLinq, and only use Linq to Xml when we’re talking specifically about Read More...
|
-
Ever since I started programming in .NET land I’ve been a C# bigot. The syntax jives with my brain. When I come across code samples presented in both VB.NET and C# I gloss over the VB.NET code in all it’s verbosity and jump directly to the real code (C#) . Since the May CTP drop of Linq I’ve been working my way through the various technologies (Standard Query Operators, Lambda Expressions, Expression Trees, Linq to Sql, Linq to Xml, etc) in an attempt to get a feel for what’s available in Linq and Read More...
|
-
I'm trying to use the DLinq to accomplish my business object hierachy, the target model is shown as following: public class Entity {....} public class User : Entity {...} public class Group : Entity {...} In the database , I have one table for each class, each table has a Guid, which has been used as the foriegn key. I designed a Enterprise.dlinq file, drag and drop all the tables to the designer and save it. After that I have done two examination: 1. using the build-in inheritance tool, but I got Read More...
|
-
You've seen Ralf Lämmel's post starting a series about our research and prototyping efforts to improve support for typed XML programming. You might also wish to keep track of Ralf's weblog which will talk about these efforts in more detail as well as the diverse other things that are on his mind. My favorite tidbit is his comparison of COBOL and XSD ... technologies that are scorned by the cognoscenti but adopted wholesale by the masses. There's even more intriguing stuff at his Amsterdam homepage Read More...
|
-
Object Relational Mapping tools have gotten a lot of “press” over the course of the last several years. As more and more developers start to realize their potential, they’ll also get to experience the object/relational impedance mismatch first hand! With the upcoming release of ADO.NET Entities the Microsoft developer community will finally learn to grok the power of the conceptual model. They’ll learn to love how it lets them think about their domain and they’ll really love the fact that they won’t Read More...
|
-
This post starts a series (of blog posts) on what I would like to call “ T yped XML programming ”. The overall goal of the series is to engage in a discussion on requirements, scenarios and priorities around typed XML programming. The first post sets up some real basics, poses some questions, and hopefully triggers appetite in getting back to this thread. What is typed XML programming anyway? In elevator speech, I mean by that “ XML programming in mainstream OO languages like C#, Java and VB while Read More...
|
-
If your interested in what’s coming in the next version of ADO.NET you’ll want to checkout the ADO.NET Entity Framework: How. What. Why. video on channel 9. If you’ve already read the ADO.NET Next gen documents on MSDN there isn’t a whole lot in the video that you probably don’t already know. Hopefully the first CTP will drop soon! Read More...
|
-
Scott Guthrie's has a nice writeup detailing how he created a Photo Tagging site using ASP.NET 2.0, Linq, and Atlas . Read More...
|
-
Hi, I have one question: Is there any option to access column value in LINQ query by column name, like (for example): Code Snippet string text = "ALFIKI"; var x = from c in db.Customers where c["Name"].Equals(text) select x; I would like to add that the purpose is: Listen to PropertyChanged event, read e.PropertyName, than read value of Property. Maybe there is another method to read the value? Any code example will be very helpful. Regards Dariusz Jankowski Read More...
|
-
With a tip of a hat to Rudyard and his ballad , I would say Oh SQL is SQL and C# is C#, and never the twain shall meet Till rows and objects manually a dev has both to beat But there is neither SQL nor C#, nor join nor dot When LINQ stands to link the twin what magic have I got Ballads aside, this is a real problem that we are grappling with. There is really nothing new about this problem - it is the problem of Object Relational Mapping (ORM). The two worlds are rules by languages and run-times that Read More...
|
-
I know I've not been attentive for a while. However, is that any reason to try and steal my crown? It looks like Charles Petzold is trying to be funnier than me. Check out his plan for a new book. He claims it's an ' Evolutionary Leap '. I'll gladly give him the crown if he publishes it. However, it seems the Intentional Software guys are taking him seriously. I wonder if there is something to it. Read More...
|
-
I mentioned this a few months back to Kieth Farmer and had no time to actually post this anywhere. I loved LINQ when I saw it at PDC 05 and wanted to experiment with building an IEnumerable based query framework with many of the same features. The purpose of the Rockside project was to emulate much of what's in LINQ without the need to use a special compiler. I've finally been able to start blogging about the Rockside project as well as take a deep dive into LINQ at my blog at http://community.bennettadelson.com/blogs/rbuckton Read More...
|
-
Check out this screen shot of an XPath Tool Window running inside Visual Studio 2005 that executes XPath queries against your current XML document window. DonXML as written a nice intro to how it works on his website and has posted the installer and source code on the new Mvp.Xml Codeplex Project. The code shows how you can integrate with the XML editor in Visual Studio and I'm sure this nifty tool will help a lot of users who are struggling with getting their XPath expressions working. Nice work Read More...
|
-
If you project into a custom type that happens to have an indexer, LINQ to SQL throws a TargetInvocationException. For example, take a simple Customer class as follows: class Customer { public string Name; } You can project into it without error as follows: var q = from c in dataContext.Contacts select new Customer() { c.Name }; But if you now add an indexer to Customer (or its base class, as it happens), eg: class Customer { public string Name; public int this[int index] { get { return 1; } } } Read More...
|
|
|
|