Rick Strahl's Web Log

Wind, waves, code and everything in between...
ASP.NET • C# • HTML5 • JavaScript • AngularJs
Contact   •   Articles   •   Products   •   Support   •   Search
Ad-free experience sponsored by:
ASPOSE - the market leader of .NET and Java APIs for file formats – natively work with DOCX, XLSX, PPT, PDF, images and more

WebLog Posts in Category ADO.NET


Categories
ASP.NET (261) .NET (124) JavaScript (71) jQuery (61) Windows (52) Visual Studio (49) AJAX (47) IIS (46) CSharp (43) HTML (38) ASP.NET (35) Localization (32) LINQ (30) ASP.NET Core (30) Personal (28) WCF (28) WPF (25) MVC (25) HTML5 (24) FoxPro (22) Security (21) Web Services (19) CSS (18) Angular (17) ADO.NET (16) C# (16) Web Api (16) COM (15) Vista (12) XML (11) .NET Core (11) HTTP (10) IIS7 (10) Sql Server (9) Microsoft AJAX (8) Markdown (7) IIS7 (7) Web Connection (7) West Wind Ajax Toolkit (7) Entity Framework (6) Internet Explorer (6) Html Help Builder (5) Live Writer (5) OWIN (5) C++ (5) ASPNET5 (5) SignalR (5) Silverlight (5) Source Control (4) Westwind.Globalization (4) WinForms (4) Cordova (4) NuGet (4) Markdown Monster (4) Mobile (4) Networking (3) Opinion (3) Razor (3) LetsEncrypt (3) Help Builder (3) ISV (3) Conferences (3) DataBinding (3) WebLog (3) Web Browser Control (3) Software Development (3) Speaking (2) RegEx (2) RSS (2) Tools (2) Visual Studio Code (2) Help (2) ASP.NET vNext (2) Bugs (2) Linux (2) Installation (2) Office (2) RazorPages (1) Musings (1) Migration (1) Maui (1) IOS (1) iPhone (1) JSON (1) Azure (1) Blazor (1) ASP.NET Markdown (1) Visual Studio (1) ADO.NET (1) .NET Standard (1) Addins (1) Graphics (1) Hardware (1) fasdd (1) FireFox (1) Flexbox (1) Deployment (1) Dynamic Types (1) Control Development (1) Chocolatey (1) Web Assembly (1) Travel (1) Typescript (1) Testing (1) Threading (1) rxJs (1) SEO (1) Web Deployment Projects (1) Web Design (1) wwHoverPanel (1) Windsurfing (1)

Working around the lack of dynamic DbProviderFactory loading in .NET Core



.NET Core and .NET Standard are missing the DbProviderFactories class which is used to dynamically load ADO.NET DbProviderFactory instances which in turn are used to gain access to the various ADO.NET intrinsic objects generically without requiring an explicit reference to the data access provider. In this post I describe why this can be a problem for libraries that use multiple data providers and show a workaround for loading a DbProviderFactory without taking an explict dependency on the provider assembly.

Resetting Entity Framework Migrations to a clean Slate



I've had a number of problems with Entity Framework Migrations getting out of whack to the point were I can't get the database and the migrations into sync to accept new changes. I've found that rather than spending hours fixing out of whack migrations it's sometimes much easier to simply wipe the slate clean and create a new initial migration. This post describes the steps on how to remove existing migrations and create a new initial migration from the current schema.

Basic Spatial Data with SQL Server and Entity Framework 5.0



Spatial data has been available for a while in SQL Server, but if you wanted to use it with Entiry Framework you had to jump through some hoops. In this post I show how basic SQL Spatial data works and then how you can utilize the new features in EF 5.0 to directly access spatial data using your CodeFirst models.

Creating a Dynamic DataReader for easier Property Access



Custom dynamic types in .NET are great to wrap other data structures into easier to use and cleaner object.property interfaces. In this post I demonstrate how you can create a dynamic DataReader that allows access to a DataReader's fields using plain object.property syntax.

LINQ to SQL and missing Many to Many EntityRefs



LINQ to SQL expects every table to be mapped to have primary keys which is reasonable. However, today I ran into a problem with an existing database and a many to many relationship which did not have a Pk in the link table. The model and underlying XML seemed to map this just fine, however, the actual generated code did not approve of this arrangement.

LINQ to SQL and Transactions



Using explicit Transactions with Linq to Sql is fairly rare but when you need them you'll find that it natively doesn't provide manual transaction management. Rather you have to rely on the TransactionScope class to provide transaction wrapping. Here's a contrived example, and a couple of different transaction scenarios using TransactionScope to manage multiple L2S data operation as a single transaction.

OleDb Parameters to access FoxPro Data from .NET



OleDb – what a blast from the past. Got a couple of basic questions in the last week on how to access FoxPro data from .NET via OleDb and both questions got tripped up with the parameters query parameter are passed. It’s been so long since I’ve used the OleDb driver I had to look this up again myself to remember how this works  through FoxPro OleDb. The issue is that the VFP OleDb driver...

Silverlight and Data Communications



Silverlight sports a host of 'data access' mechanisms that allow consumption of data from the server. However, if the data is highly dynamic and changeable the combination of a lack of dynamic data retrieval mechanisms, plus use of a static language like C# has made me wonder how to best approach the data access for a very dynamic application.

Dynamic Queries and LINQ Expressions



Using LINQ to SQL in some scenarios where dynamic expresions are required on the right side of a LINQ query expression can be tricky. How do you for example allow a query to use a dynamic field in a query and then query its data? Due to the strong typed nature of LINQ direct LINQ syntax can't be used for this sort of query, but there are a several ways to work around this by using dynamic expressions.

LINQ To SQL and the Web.Config ConnectionString Value



I just got had by an odd behavior in the LINQ to SQL model designer when working with a LINQ to SQL Model in a separate class library project. I use LINQ to SQL in a business layer which always lives in a separate assembly and so the model does not live in the same project as the Web (or other)...

Complex Detached Entities in LINQ to SQL - more Nightmares



Ok, so I thought I had the detached entity state in LINQ to SQL figured out, only to have that thrown back into my face. The word from Microsoft is that if you have an entity that was loaded through a LINQ to SQL DataContext at any point it cannot be re-attached to the DataContext.

A simple Business Object wrapper for LINQ to SQL



I've been talking about how I'm using a small business object wrapper around LINQ to SQL to provide better abstraction of the LINQ to SQL functionality and I suppose the time's come to be bit more specific. This is going to be a long post with a fair bit of code and a brief discussion of the whys and hows...

LINQ to SQL Queries out of a Business Layer



Using LINQ to SQL for queries out of a business layer has some cool benefits in that core business layer queries returned from business objects can further refine query before the final query operates against the database. This allows the client to perform common formatting like picking which fields to retrieve, changing order or applying a final front end filter on the data. It also allows the client to choose best to represent the query results as an entity list or data reader/data table etc. This entry shows a few ways of how this has advantages and how a business object can greatly facilitate the data serving process.

LINQ to SQL Serialization bites me again



I'm mucking around with a bit of code today that's using AJAX and returning some data from my business layer that's using LINQ to SQL Entities. I mentioned some time that one issue that I ran into and continue to bump my head against is that LINQ to SQL has big issues serializing its entities. The...

First Impressions on LINQ to SQL



I've been experimenting with LINQ to SQL for the last few weeks and there's a lot to like as well as a few things to think about. In this editorial I'll describe some of the things that worked well and some of the issues I struggled with and how I worked around them.

LINQ to SQL and Serialization



LINQ to SQL provides entity objects that can be used easily for object access to data members. But these objects can be difficult to deal with if you need to serialize them in Web Services or in other ways because relationships are often circular. Here's a discussion of things to watch out for and how you can get around the issues.
West Wind  © Rick Strahl, West Wind Technologies, 2005 - 2018