-
The Rich Set of Data Annotation and Validation Attributes in .NET
Last updated: Wednesday, January 18, 2023
Published in: CODE Magazine: 2023 - January/February
Paul teachs how to use many of the data annotations available in .NET; likely the ones you will use most often. Plus he shows you how to build custom validation attributes using the [CustomValidation] attribute. Finally, learn to localize error messages using resource files.
-
Simplifying ADO.NET Code in .NET 6: Part 3
Last updated: Wednesday, January 4, 2023
Published in: CODE Magazine: 2022 - November/December
In the first two articles, you learned how to retrieve data using a set of wrapper classes. This time, Paul’s going to show you how to modify tables, perform transactions, validate data annotations, and add exception handling.
-
Simplifying ADO.NET Code in .NET 6: Part 2
Last updated: Wednesday, August 31, 2022
Published in: CODE Magazine: 2022 - September/October
The second installment in Paul’s new series refactors the code you built in Part 1 to make it more reusable. You’ll also learn to get data from a view, handle multiple result sets, get a scalar value, and call stored procedures.
-
Simplifying ADO.NET Code in .NET 6: Part 1
Last updated: Wednesday, August 31, 2022
Published in: CODE Magazine: 2022 - July/August
Paul starts a new series about creating reusable wrappers that limit the amount of code you need to write when you’re working with ADO.NET in .NET 6.
-
Tooling for Your .NET Projects
Last updated: Wednesday, May 19, 2021
Published in: CODE Magazine: 2017 - May/June
You’ve been plodding along, nose to the grindstone, and you might not have realized that there are some useful tools out there that can make your .NET projects a little more fun to build. Rachel explores Paket, F# Formatting, and FAKE.
-
Data Access Options in Visual Studio 2008
Last updated: Tuesday, February 19, 2019
Published in: CODE Magazine: 2008 - September/October
With Visual Studio 2008 and .NET 3.5, developer’s data access options have increased substantially. In addition to using ADO.NET to create DataReaders or DataSets, Microsoft has added LINQ to SQL and Entity Framework as well as ADO.NET Data Services, which leverages those two. In addition to these new options, there are new syntaxes to learn. LINQ, which is built into Visual Basic and C#, has one implementation for LINQ to SQL and another for LINQ to Entities. In Entity Framework, you have the option to use LINQ to Entities as well as two other ways of querying with Entity SQL, as you can see in Figure 1.
-
Getting Started with Windows Mobile Development
Last updated: Wednesday, August 31, 2022
Published in: CODE Magazine: 2008 - July/August
In today’s world of fast food, fast cars, and instant gratification, people expect to be in touch at all times.We have become conditioned to staying in touch with businesses, friends, and families. Because of this desire for instant data, we have the Internet, cell phones, Wi-Fi, MP3 players, and DVD players. As the equipment needed to drive this thirst has become smaller and smaller, we find ourselves looking for portable replacements for our bulky desktop computers.
-
ADO.NET Data Services
Last updated: Tuesday, February 19, 2019
Published in: CODE Focus Magazine: 2007 - Vol. 4 - Issue 3 - Data Programability
Separation of presentation and data has long been considered a best practice in the development of Web applications.Driven by the need for low friction deployment and a richer user experience, the types and architectures of Web applications are evolving dramatically. With the introduction and growth of AJAX-based applications and Rich Interactive Applications (RIA) using technologies such as Microsoft® Silverlight™, separation of presentation and data is no longer just a best practice, it is required.
-
An Entity Data Model for Relational Data Part I: Defining the Entity Data Model
Last updated: Wednesday, February 20, 2019
Published in: CODE Focus Magazine: 2007 - Vol. 4 - Issue 3 - Data Programability
Microsoft’s Entity Data Model allows you to define an application-oriented view of your data consistent with how you reason about that data.Part I of this article describes the Entity Data Model and how it enables you to represent real-world concepts in a way that makes relationships between related pieces of data more explicit and easier to query, navigate, and consume than through the traditional relational database model. Part II of the article discusses how Microsoft’s ADO.NET Entity Framework provides a flexible mapping of an application-oriented conceptual schema in terms of the Entity Data Model to existing relational database schemas. Shyam Pather’s article, “Programming Against the ADO.NET Entity Framework” completes the picture by describing the actual programming model and API exposed by the framework.
-
An Entity Data Model for Relational Data Part II: Mapping an Entity Data Model to a Relational Store
Last updated: Saturday, January 18, 2020
Published in: CODE Focus Magazine: 2007 - Vol. 4 - Issue 3 - Data Programability
The ADO.NET Entity Framework allows you to define an application-oriented view of your data consistent with how you reason about that data, and map that conceptual view to existing relational schemas.Part I of this article described the Entity Data Model and how it enables you to model real-world concepts in a more natural way. Part II of the article describes how that Entity Data Model is used within the ADO.NET Entity Framework to define an application-oriented conceptual view of your data, and how that view can be flexibly mapped to existing relational schemas. Shyam Pather’s article, “Programming Against the ADO.NET Entity Framework” completes the picture by describing the actual programming model and API used by developers to work with data using the ADO.NET Entity Framework.
-
Caching with SQL Server Compact and the Microsoft Sync Framework for ADO.NET
Last updated: Wednesday, August 31, 2022
Published in: CODE Focus Magazine: 2007 - Vol. 4 - Issue 3 - Data Programability
With Sync Services for ADO.NET, developers can easily optimize their online experience by caching data locally within the easy-to-deploy SQL Server Compact embedded database engine.In this article I’ll cover how Sync Services for ADO.NET was designed to fit the growing developer needs for caching data locally in online-optimized, offline-enabled applications.
-
Introducing the Microsoft Sync Framework: Next Generation Synchronization Framework
Last updated: Tuesday, February 19, 2019
Published in: CODE Focus Magazine: 2007 - Vol. 4 - Issue 3 - Data Programability
The Microsoft® Sync Framework is the new framework and runtime for adding synchronization, roaming, and offline capabilities to applications. It supports peer-to-peer scenarios, works with devices and services, and is agnostic of data types, stores, and protocols. In this article, I’ll cover the high-level vision for the platform as well as the enabled scenarios made possible by the framework for developers, ISVs, and OEMs.
-
LINQ to Relational Data: Who’s Who?
Last updated: Tuesday, February 19, 2019
Published in: CODE Focus Magazine: 2007 - Vol. 4 - Issue 3 - Data Programability
With the combined launch of Visual Studio 2008, SQL Server 2008, and Windows Server 2008, Microsoft is introducing five implementations of .NET Language Integrated Query (LINQ).Of these five implementations, two specifically target access to relational databases: LINQ to SQL and LINQ to Entities.
-
Programming Against the ADO.NET Entity Framework
Last updated: Wednesday, February 20, 2019
Published in: CODE Focus Magazine: 2007 - Vol. 4 - Issue 3 - Data Programability
The ADO.NET Entity Framework raises the level of abstraction at which developers work with data.Rather than coding against rows and columns, the ADO.NET Entity Framework allows you to define a higher-level Entity Data Model over your relational data, and then program in terms of this model. You get to deal with your data in the shapes that make sense for your application and those shapes are expressed in a richer vocabulary that include concepts like inheritance, complex types, and explicit relationships.The ADO.NET Entity Framework raises the level of abstraction at which developers work with data.Rather than coding against rows and columns, the ADO.NET Entity Framework allows you to define a higher-level Entity Data Model over your relational data, and then program in terms of this model. You get to deal with your data in the shapes that make sense for your application and those shapes are expressed in a richer vocabulary that include concepts like inheritance, complex types, and explicit relationships.
-
Introducing ADO.NET Entity Framework
Last updated: Tuesday, February 19, 2019
Published in: CODE Magazine: 2007 - November/December
The challenge of bringing data from efficient storage engines such as SQL Server into object-oriented programming models is hardly a new one. Most developers address this challenge by writing complex data access code to move data between their applications and the database. This requires an understanding of the database so that you can access data either from the raw tables, from views, or from stored procedures.</b>
-
Chapter 1: RESTful Systems - Back to the Future
Last updated: Saturday, January 18, 2020
Published in: Book Excerpts
Developers are rapidly discovering the power of REST to simplify the development of even the most sophisticated Web services—and today's .NET platform is packed with tools for effective REST development. Now, for the first time, there's a complete, practical guide to building REST-based services with .NET development technologies.
-
The Baker’s Dozen Doubleheader: 26 Productivity Tips for Managing Data (Part 1 of 2)
Last updated: Wednesday, August 31, 2022
Published in: CODE Magazine: 2006 - July/August
Regardless of your .NET language of choice, managing data is a vital skill for most applications. Developers frequently must work with data at different levels, with different tools, and in different forms. This article is the first in a two-part series on some of the more common data challenges that developers face. In Part 1 of this article, I’ll cover some capabilities in ADO.NET 2.0, ASP.NET 2.0, and T-SQL 2005. Part 2 will feature some additional T-SQL 2005 coverage, as well as ways to use .NET 2.0 generics.
-
SQL Server 2005 Query Notifications Tell .NET 2.0 Apps When Critical Data Changes
Last updated: Tuesday, February 19, 2019
Published in: CODE Magazine: 2006 - May/June
One of the classic problems with database applications is refreshing stale data. Imagine a typical e-commerce site with products and categories. A vendor’s product list most likely does not change very often and their category list changes even less frequently. However, those same lists must be queried from the database over and over again every time a user browses to that Web site. This is an annoyingly inefficient use of resources and developers and architects have been stuck playing cat-and-mouse trying to reduce the waste.
-
System.Transactions and ADO.NET 2.0
Last updated: Wednesday, August 31, 2022
Published in: CODE Magazine: 2006 - May/June
Data is the blood in your system; it sits in its comfortable home of a database, and camps out in the tent of XML, but it deserves to be worked with in a reliable and consistent manner.But why should only data-related operations be reliable? Shouldn’t you want to write reliable code for your other operations? The introduction of System.Transactions in .NET 2.0 brings a paradigm shift of how you will write reliable transactional code on the Windows platform. This article dives deep in the depths of how System.Transactions works, and how you can use it to your advantage. You will also see how you can leverage existing System.Transactions integration within ADO.NET, and why you need to really understand what is under the magic carpet.
-
The Baker’s Dozen: 13 Productivity Tips for ADO.NET 2.0
Last updated: Tuesday, February 19, 2019
Published in: CODE Magazine: 2006 - January/February
This installment of “The Baker’s Dozen” presents a variety of tips and techniques to become productive with data handling techniques using ADO.NET 2.0 in Visual Studio 2005. ADO.NET 2.0 is faster than the first version of ADO.NET; in some instances, significantly faster. While many view ADO.NET 2.0 as more evolutionary than revolutionary, it provides many functions to give developers greater control over data access and data manipulation. It also leverages the new database capabilities in SQL Server 2005. In addition, ADO.NET 2.0 simplifies the creation of multiple-database solutions.
-
Sorting Objectively
Last updated: Wednesday, February 20, 2019
Published in: CODE Magazine: 2005 - January/February
Jonathan Goodyear (the Angry Coder) January/Febuary 2005
-
Data Access with Microsoft Application Blocks
Last updated: Tuesday, February 19, 2019
Published in: CODE Magazine: 2004 - November/December
ADO.NET SQL Data access made simple and efficient.Microsoft has created a set of libraries known as Application Blocks. These libraries will help developers reduce the amount of code they must write while using the current best practices. One of the components, Data Access Application Block for .NET, addresses Microsoft SQL Server data access by wrapping up data access into a helper class.
-
A Look Under the Hood of Windows Forms Data Binding
Last updated: Tuesday, February 19, 2019
Published in: CODE Magazine: 2004 - September/October
Many developers have a dream: easy and efficient data binding.To be really quick and profitable, RAD (rapid application development) tools and techniques must be strong in data binding. They must provide a programming interface that is both easy to use and effective. Easy design-time composition of user interfaces; effective support of complex scenarios of interrelated data, dependencies, and filtering. In Windows Forms, the data binding machinery is highly sophisticated and designed to meet common needs of former client/server applications, now migrating to the more modern .NET multi-tier design. This article reviews common Windows Forms data binding techniques and provides answers and explanations.
-
Drag-Once Databinding
Last updated: Wednesday, February 20, 2019
Published in: CODE Magazine: 2004 - September/October
Using the new Data Sources Window in Visual Studio 2005, developers can now drag columns of their typed DataSets or properties of their own business objects directly to their form. Visual Studio 2005 will create, name, and label controls for each bound property. For those that prefer to lay out the forms with the toolbox, developers can use "Connect the Dots DataBinding" to drag and drop from the Data Sources Window onto their existing controls.
-
ADO.NET: Building Your First Data-Aware Form
Last updated: Wednesday, August 31, 2022
Published in: CODE Magazine: 2002 - September/October
The first article in this series detailed how to build data-aware forms in Visual Studio .NET using the Data Form Wizard. It demonstrated how easy it is to build forms using a point-and-click interface. You also learned that the generated form was especially suited to production development. This article continues where that article left off and introduces you to techniques to improve data-aware forms created with the Data Form Wizard.
-
ADO.NET in Visual Studio .NET: Part 1
Last updated: Tuesday, February 19, 2019
Published in: CODE Magazine: 2002 - July/August
By now, you have been exposed to a lot of information about Visual Studio .NET.Of all the new technologies associated with .NET, perhaps no other technology is more mysterious than ADO.NET. The purpose of this article, the first in a series, is to give you a brief overview of ADO.NET and how it is implemented in Visual Studio .NET. Future articles will expand on the material presented here. After reading this article, you will be able to understand how the various ADO.NET objects and generated code work to provide data for your applications.
-
Introduction to Crystal Reports .NET
Last updated: Tuesday, February 19, 2019
Published in: CODE Magazine: 2002 - July/August
Crystal Reports is officially a member of the Visual Studio .NET product.It is included in all major editions and ships in all languages available with Visual Studio .NET. Crystal Reports .NET provides developers with the fastest, most productive way to create and integrate presentation-quality, interactive reports that scale to meet the demands of end users. This article introduces you to Crystal Reports .NET and shows you how to create reports and view them in either a Windows form or a Web form. I will also show you how to publish a report as a Web service and consume the service in a Web form.
-
Passing Data Over .NET Web Services
Last updated: Tuesday, February 19, 2019
Published in: CODE Magazine: 2002 - January/February
Web Services is a powerful technology, even in its basic form.However, with .NET, you can easily couple Web Services with .NET's new data services to provide a powerful data delivery mechanism that works over the Web, making it possible to build distributed applications that work easily without a local data store. In this article, Rick describes various ways you can use Web Services and ADO.NET DataSets to pass data between client and server applications to build truly disconnected applications.
-
Building Data Access Components in C#
Last updated: Wednesday, November 30, 2022
Published in: CODE Magazine: 2001 - Issue 1
With the functionality provided by the .NET runtime, building data access components with C# (pronounced "c-sharp") is not difficult.In this article, we discuss how to access data stored in a SQL Server database. We will then review the steps necessary to build a Dynamic Link Library and an Executable file in C# to query a table and display the results.