At one of my clients, I was showing him how to structure a complex Linq query. This came as a surprise to him and I thought it was worth a quick blog entry.
I get tagged in a lot of discussion about Dapper vs. Entity Framework. This feels like nHibernate v. Linq2Sql redux. Well, I think about it very differently.
If you didn't notice, Entity Framework Core 2.1 has a new way to support seeding your databases with a method called HasData. Julie Lerman has a great new Data Points column in MSDN that explains how a lot of it works.
I know I am not going to make everyone happy with this post. I've been hoping to not have to make this post, but Entity Framework Core has finally added support for Lazy Loading, so it's time.
As many of you know, my recent course on Pluralsight dealt with Best Practices in ASP.NET: Entities, Validation and View Models. As I’ve worked with clients, there seem to be a non-ending list of ways to deal with data in ASP.NET.
The first blog post I ever wrote was a short one on databases. In fact for those of you who haven’t been following me for more than ten years, my old domain was “ADOGuy.com”. I wrote about ADO and ADO.NET pretty exclusively for years.
Url: http://niagara.codeplex.com
Url: http://ayende.com/Blog/archive/2009/07/26/nhibe...
As regular readers of my blog know (RIA Services Concerns Squashed), I have been a lukewarm supporter of RIA Services for Silverlight. As many of you know, Brad Abrams and company have come through with their latest release (RIA Services Preview July '09) with lots of changes I've been hoping for. Honestly I haven't had time to look at the new build (probably this weekend), but I am hopeful of its overall direction. I am still somewhat tentitive about some of the basic behavior of the framework but I will hold my tongue until I have more time to dive deeper into the code.
To many developers this may seem odd. I talk with many staunch ALT.NET guys, and the DDD philosophy seems to be that data is a top-down or at worse, bottom up design problem. The issue here is that there is an assumption that just simply not true that data design is part of most software development projects. The reality based on my experience as well as the experience of talking with developers in the community is that many projects (though its hard to exactly quantify what percentage) begin with existing data. This is especially true in the enterprise where data exists in many forms from new databases, legacy servers (e.g. mainframes) or even flat files and XML. It is the rare project that is new code against all new data.
If you havent voted, please feel free to vote for what data access strategy here:
I had interesting conversations with a number of people about different data access/ORM strategies at MIX recently and was trying to understand where people are spending their efforts in consuming data. The conversation was essentially a discussion of who is using what to access data in .NET applications. I had assumed that certain solutions were widely used and others were not but I didn't have a good idea of what the market was really like. To help me with this I am asking you (my readers) to share with me where you are investing time in data access by taking the following poll:
Url: http://xkcd.com/327/
Url: http://entmag.com/news/rss.asp?editorialsid=8320#1
Url: http://www.microsoft.com/downloads/details.aspx...
Url: http://wilderminds.blob.core.windows.net/downloads/TestDataConnect...
Url: http://wilderminds.blob.core.windows.net/downloads/pagingdemo.zip
Url: http://www.computerworld.com/action/article.do?...
I had an interesting discussion with some members of a class I am teaching right now about how paging is done. It looks like there are four Functions that allow for paging and using Common Table Expressions. They all can optionally include a separate ORDER BY clause to specify how they are sorted (so your result set can be sorted differently than it is ranked).
If you upgrade to RC1 be aware that SQL Server 2005 requires SP2 before it will work with Vista RC1. Yeah, I know there is no SP2...but that's the case. It just doesn't work. I am trying to hack around the problem so I'll let you know if I find a solution...
Url: http://msdn2.microsoft.com/en-US/library/system...
Url: http://www.atlantacsharp.org/NextMeeting.aspx
Url: http://www.amazon.com/exec/obidos/ASIN/15905951...
Url: http://www.devsource.com/article2/0,1895,192569...
Url: http://www.red-gate.com/products/SQL_Packager/i...
I am currently doing a bunch of evaluations on OR Mappers, Code Gen and Business Object Frameworks for my new book. If anyone knows about anything great that might go unnoticed, please drop a comment or send me an email!
I've talked with lots off prospective authors the last few years since my first book came out. I've tried to do what Chris Sells did for me, scare them... I've explained that it is long hours, lots of dedication and can get in the way of family time. I sure don't take my own advice very well. I've agreed to write another book, "Prescriptive Data Architectures" for Addison-Wesley. Unlike the first book (pre-blog craziness), I plan on using this blog to discuss my experience writing the book as well as a sounding board for my ideas that will be used in the book.
Url: http://www.microsoft.com/sql/2005/productinfo/l...
Url: https://msdn.one.microsoft.com/Subscriber/1033/...
Url: http://www.simple-talk.com/2005/07/18/database-...
Url: http://jelle.druyts.net/PermaLink.aspx?guid=616...
Url: http://news.com.com/Oracle+readies+second+grid+...
Url: http://www.devsource.com/article2/0,1759,182186...
Url: http://www.devcow.com/weblogs/To+Use+DataSets+O...
Url: http://www.devsource.com/article2/0,1759,179167...
I've been digging deep into SQL Server 2005's CLR integration over the last few days. I am surprised by several specific omissions. My guess is that they have been dropped because of time constraints:
Forget everything I told you. It's all changed in the April CTP. I hope to re-give this talk soon in the Atlanta area with the new bits.
Url: http://channel9.msdn.com/ShowPost.aspx?PostID=5...
Url: http://wildermuth.com/content.aspx?id=rantview&...
Url: http://www.microsoft.com/downloads/details.aspx...
Url: http://www.oracle.com/technology/tech/dotnet/in...
I've been spending some time lately reviewing how companies are doing data access in .NET. When I look at how most of them have crufted up solutions, I am amazed. The model that Microsoft supports seems so obvious to me, but I am neck deep in it. I'd like to hear from my readers their specific experience with creating data access in .NET; with an eye to why or why not use COM+ for transactions; Typed DataSet or DataReaders; Business Objects or Messages. I am trying to understand where the community is.
Url: http://www.sqlmonster.com/Uwe/Forum.aspx/sql-se...
Url: http://codebetter.com/blogs/sahil.malik/archive...
Url: http://dotnetjunkies.com/WebLog/sahilmalik/arch...
Recently I was talking with Rocky Lhotka and he said something interesting:
I've had time lately to think about the nature of data in development lately. I've been talking with Rocky Lhotka and Michael Earls about it (as well as number of others) about the issues with dealing with data in applications.
I was taking a refresher MCSD test today to get ready to take one of the tests and came upon a question that is wrong. But it does infer that there is some confusion about how transactions are propogated to commands...or may be evidence that it is a bug. For example:
Url: http://www.sparxsystems.com
Url: http://news.com.com/Microsoft+reaches+beyond+pr...
Url: http://news.com.com/Microsoft+reaches+beyond+pr...
Url: http://news.com.com/2100-1012_3-5172166.html?ta...
Url: http://www.microsoft.com/sql/reporting/howtobuy...
I've been following some threads on the DevelopMentor .NET Mailing Lists about what is a good solution for O/R Mapping. I am intrigued by a couple of ideas, especially ones that no one seems to be talking about:
Anyone else remember the promised "In-Memory Database" (IMDB) that was to be part of COM+ some years back? Well, Microsoft has finally delivered a first version of it in ADO.NET's DataSet class.
Ok, this pet peeve is a biggie. Over and over I have seen database schemas that simply defined the table structures and some stored procedures. Most modern database systems support advanced features for maintaining database integrity.
The most common error I see in badly scalable database code is reckless use of the connection object. For all multi-user database programming (which accounts for most of the work these days), database connections are a limited resource. Don't let it be your code that is hanging on to his connection way after you are finished with it. I am *not* saying that all work can be done disconnected. I am simply asking you to keep in mind that Connections are precious things. Try to do these two things: