11
votes
2answers
506 views

Learning C#, how to improve the following?

I'm pretty sure I may lose some reputation points for this post, but that's a small price to pay if I can learn more. So I'm trying to teach myself C#. I'm finding the syntax a lot easier to deal ...
5
votes
2answers
593 views

Strategy Pattern for Oracle Database? (C# Code)

I'm trying to implement the Strategy Pattern into my current code base. I would like to know if i'm going in the right direction on this? IOracleDB.cs: /// <summary> /// Strategy /// ...
4
votes
1answer
623 views

OLEDB table fetching function in C#

I'm working on a small project with dBase files from a 3rd party. Realizing that most of the code to fetch tables and form objects is the same, I made this function: public static ...
3
votes
2answers
543 views

Can you review this small method for saving student attendance?

var studentRepo = new StudentRepository(); int gradeParaleloId = Convert.ToInt32(cmbGradeParalelo.SelectedValue); var students = studentRepo.FindAllStudentsFromGradeParalelo(gradeParaleloId); int ...
3
votes
1answer
180 views

Is my base class constructed correctly?

I have tables that use BulkManager to save data to database. I moved common functionality to BulkTableBase. Because creation of BulkManager depends on params of each Table I create the BulkManager in ...
2
votes
1answer
481 views

reusable data access class in C#

Below is my attempt at the beginnings of a reusable ado.net data access class. Please let me know of any improvements that I could make. Thanks! public class DataAccess : IDisposable { ...
2
votes
1answer
70 views

Testing database table creation with NUnit

I'm new to using NUnit and have written a test to check for the existence of a database table. I have the below code that should check whether a new table named NewTable has been created in the ...
2
votes
2answers
2k views

How to improve performance in this database connection class?

This is my general database connection class. I am using this class to execute my queries through website. What would your suggestions about this to improve performance. Thank you. MSSQL 2008 R2 SP1 ...
1
vote
1answer
88 views

Improve and adding new method to GenericDataAccess?

I have this GenericDataAccess class to interact with database from my school just I want to ask for some suggestions and advice in how to to improve it and add new methods to for future use & ...
1
vote
0answers
1k views

Database Handler - Dynamically create “mdf file” and tables from classes (NEED HELP/SUGGESTIONS) [closed]

I'm trying to create a handler that first of all creates a "mdf" file, which I later connect to. Then I can add tables from a type, that gets all its properties and values. So a class with 2 ...
0
votes
2answers
189 views

Critique my Database design/help me simplify my C# code please

I wish to create a database for a webpage where users are able to add their own events to a timetable. Users will be able to decide if the events should be recurring (weekly) or not. Users should be ...
0
votes
1answer
84 views

Nhibernate session and transaction implementation

In order to create loose coupling architecture on my web applications, I have created my own implementation for orm, in this case, nhibernate. I want you please to review the code and tell me if you ...
0
votes
1answer
360 views

Review my repository wrapper

I'm new to C# (mostly doing C++ development) and I would like some high skilled C# coder or enthusiast to comment the following implementation of the repository proxy. If there is something that you ...
0
votes
0answers
64 views

Building database from file C# Mysql

well as the question reads I am building a database with 3 tables. Now these tables are going to be used to store names in. Table 1 will store First Names Table 2 will store Last Names Table 3 will ...