Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [ado.net]

ADO.NET is a set of computer software components that programmers can use to access data and data services based on disconnected DataSets and XML. It is a part of the base class library that is included with the Microsoft .NET Framework. It is commonly used by programmers to access and modify data stored in relational database systems, though it can also access data in non-relational sources.

1
vote
2answers
229 views

ADO.NET DAO Layer Design With Base DAO

I have a database with a number of stored procedures. These stored procedures provide the basic CRUD operations against the data. I'm trying to create a DAO layer with separate DAOs for each domain ...
4
votes
2answers
85 views

Simple locale loader

I have a class that loads locales from a database. I'm not sure if locale is the right word. It's basically loading texts for a game, generic sayings like alerts and error messages. I'm also not sure ...
-1
votes
1answer
685 views

Ado.Net and Async insert of many rows to db

I have implemented repository in Ado.Net which insert data to many tables. I insert all in one transaction and use async/await to improve performances. If you have any suggestions have to improve my ...
3
votes
1answer
527 views

Implementing RecordSet-like class in C#

From the outset, let me state that I'm working with some older technology. I'd rather use Entity Framework, but I have to use what the client is using if I want to get paid. I am converting some old ...
3
votes
2answers
2k views

ADO.NET database access layer

I am attempting to create a database access layer. I am looking for some improvements to this class/recommendations on best practice. It would be helpful if someone could point me to documentation on ...
1
vote
0answers
235 views

Simple AuditLog

I am using ADO.NET in my project and I want to have a simple AuditLog. I have below Codes for that but I wounder to know is ...
2
votes
1answer
147 views

Creating a Dynamic Select Statement from 2 databases on the same server

Can someone improve on my method for creating union select views from 2 databases located within the same server in C#, here is the code for the method: ...
2
votes
2answers
2k views

Merge two DataTables by adding corresponding entries

I've been looking over internet for a method of combining 2 datatables with exactly the same cells with numbers to add them together, Merge method never help because it just appended the second table. ...
3
votes
2answers
2k views

Class for managing database connections

Looking for feedback for a class I'm writing to manage my db connections/queries on my site (.net core c# web api, MS Sql DB). The reason behind the class was the ever growing list of db calls and ...
4
votes
1answer
4k views

Retrieving data in an SQL database and displaying the retrieved data in ASP.NET

I wanted to know other ways where you can access data from the database into the asp.net website that I've created for displaying details and images. As well as looking for better ways to use those ...
1
vote
3answers
130 views

Generate 10000 matrix barcodes

When generating a matrix barcode, it takes 1 minute per 10000 files .That's how to generating a matrix barcode for big quantities in less time. Here is the library used to encoder data. My code for ...
3
votes
2answers
92 views

Display information returned from feedservice and SQL querys on WPF window

The class file below handles the display of information to a WPF window. In its current state it works except for the fast it takes 2 minutes for the window to open because of the SQL query's and ...
1
vote
0answers
26 views

ADO.NET DataRow auto updater

I'm currently learning ADO.NET and I've written a small auto updater to move data automatically between a class and a datarow. General usage would be to create a class and mark the DataRow and ...
2
votes
0answers
5k views

Mapping Excel columns to table columns, then processing data

I have written some code for mapping excel columns to table columns and processing data after mapping columns. Please review this code, check for SOLID, OOP principles and suggest any improvements and ...
10
votes
1answer
6k views

Unit of Work (UoW) pattern with ADO.NET

I'm trying to implement the UoW pattern using ADO.NET and this is what I've achieved so far: The IUnitOfWork Interface: ...
3
votes
1answer
411 views

ADO.NET Wrapper

I end up writing a lot of the same code when I query a database I thought I would try to encapsulate that all in a class that could be used by any provider that implemented IDbConnection. i'm not ...
6
votes
3answers
9k views
2
votes
2answers
133 views

ADO.NET transaction handling

Please let me know your feedback around handling ADO.NET connection and transaction, especially when it comes the catch block. Any way I could improve? ...
2
votes
1answer
415 views

Data Access Layer to return Data Transformation object

I am trying to create a Data Access Layer using ADO.Net. I have created a generic method for ExecuteNonQuery. The stored procedure I am calling will return two parameters. The output parameters from ...
5
votes
5answers
714 views

Handle IDisposable objects

When I work a lot with objects, that implements IDisposable I am using this pattern, like shown here with a SqlConnection and a SqlCommand. ...
2
votes
0answers
42 views

Queries within transaction

I am almost finished with my queries which are running inside transactions so it's everything or nothing... Could you please take a look if I am missing something or if everything is where it belongs? ...
1
vote
0answers
737 views

WCF service architecture when SQL Server direct table access is not allowed

Part of my job is to maintain an old application written in Silverlight talking to a WCF service which in turn fetch/persist data into a SQL Server database and in a BI cube. Most of the security is ...
4
votes
1answer
16k views
1
vote
0answers
135 views

Boiler-plate reduction or elimination layer for System.Data .net 4.0

I'd really like to get this to be as clean as possible such that the C# access to it looks succinct. To that end, I've made C# helper methods that abstract out things like ...
4
votes
3answers
11k views

Simple SqlHelper which wraps ADO.NET methods

I am creating a simple SqlHelper which will simplify the ADO.NET method usage. Can someone please review this class for any issue or missing something? ...
4
votes
1answer
7k views

Batch of SQL statements in a single query

I'm using the following query for multiple transactions. This is the scenario. Generate Salary (this is not in the scope of the query) I have employee attendance in ...
6
votes
2answers
5k views

Multiple SQL statements in a single transaction

Using the following query I'm doing transactions with two tables ...
6
votes
2answers
23k views

Transform DataReader to List<T> using reflections

I have implemented the code to convert datareader to list of objects. My intention was to not to use column name string literals while reading the datareader. ...
4
votes
2answers
668 views

DAL Returns a collection of business objects in MVP

In Model View Presenter (MVP) pattern, it is said that our DAL always should returns business models. If I want to get a list ...
11
votes
2answers
5k views

3 tier architecture ado.net application

I would like to develop a student management system with repository pattern using ado.net (no EF or MVC). I decided to create the model (business objects) and interfaces as one project "StudentModel"....
2
votes
2answers
1k views

Database connection approach

We have recently started working in ASP.NET and starting a simple CRUD Web application in ASP.Net. Here is the approach we are following to connect to DB. Connection.cs ...
5
votes
1answer
586 views

Hard-to-test 3 Tier Architecture

I'm having trouble testing some code. It's laid out in such a way that the business logic relies on the persistence layer. Some classes require that an object be saved to a database. Some classes re-...
4
votes
1answer
5k views

Using model view presenter (MVP) in C# code

I'm a beginner to Model-View-Presenter pattern and I'm finding a way to use it in a sample application In my C# winforms application has a Employee Class and it ...
3
votes
2answers
136 views

Return office details from multiple tables

The function itself is just returning as void. But, the point of the posted code is not about what the function is returning. It is the code related to using T-SQL ...
5
votes
1answer
792 views

Build object from database without a discriminator column?

I currently have a basic application that has a database backing it. I originally connected to the database with Entity Framework, but my tutor has requested from me to recreate the functionality with ...
5
votes
2answers
1k views

Interacting with a database

I've written my first class to interact with a database. I was hoping I could get some feedback on the design of my class and areas that I need to improve on. Is there anything I'm doing below that is ...