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

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

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.

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.
West Wind  © Rick Strahl, West Wind Technologies, 2005 - 2017