1
vote
2answers
97 views

MySQL GEAR, C# class for ASP.NET project

I've developed my own class in ASP.NET project to access MySQL and make queries, scalars and read the result from it. I want you to review my class and tell me where did I make a mistake, thanks! ...
0
votes
2answers
79 views

I would just like to find out if the code below is the correct way of creating a generic list and populating it?

using System; using System.Collections; using System.Collections.Generic; using System.Data; using System.Diagnostics; using System.Linq; using System.Text; public class InnerJoinTables { public ...
7
votes
3answers
335 views

Class with a sometimes unused property

From times to times I stumble over the following situation: I have got a class with a property that's only used if another property has a particular value, for instance: public enum ...
0
votes
1answer
148 views

Making a Custom class less specialized but just as understandable?

In my C# program, I have a class defined as follows: public class DbResult { public bool bSuccess { get; private set; } public String Message { get; private set; } private DbResult(bool ...
3
votes
1answer
121 views

Avoid explicitly writing base class state in a derived class. Suggestions for my method

I have two classes one base Foo class and one derived Bar class. Each class has its own associated settings class that can create a new instance from the Load method. This way all derived class ...
3
votes
1answer
187 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 ...
1
vote
1answer
189 views

How can I improve upon my SharePoint Class?

To help learn the SharPoint Object Model (Primarily for SharePoint 2007) I've been working on a class library with a number of useful functions. I'm a junior developer and this is my first C# project ...
2
votes
1answer
562 views

Class with methods to retrieve data with Linq to sql

I think here is something wrong with code. I use a class with methods to get tenants from DB: public List<CrmTenant> GetAllTenants() { List<CrmTenant> tenantsList = new ...
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 ...
4
votes
1answer
405 views

C# Class of client methods for interacting with web servers

I'm in QA Automation, and C# isn't my first language. I've written a small class of methods for GETting and POSTing to web URLs. I use these when I want to test certain things that really fall outside ...
4
votes
2answers
241 views

Is it a good practice to wrap datatypes in custom classes?

So in my current application, I was thinking to make a extended class for all the datatypes. For int, it will be something like ExtendedInt, for bool it will be something like ExtendedBool. These ...
3
votes
1answer
849 views

C#: Simplfy code using Interfaces + business rules / validation

I have a workflow; within the workflow I can have many stages. I want to open and close a stage based on some business rules. E.g., stage 7 cannot be opened, because stage 5 + 6 need to be closed ...
2
votes
1answer
132 views

Best way to Structure class + Instantiation

Is this a good way to design a class so I can prevent values being changed/ the state must remain as it was when it was intantiated... This code would be normally instantiated after a call from the ...
4
votes
1answer
261 views

Should I split class or keep it all in one?

Currently, in my project I have one class that is dedicated to the all of the queries for the IBM i and converts it into usable models for my .NET code. There is already 12 methods in this class and ...
2
votes
2answers
347 views

beginner's class inheritance question C# VB Visual Studio 2010

I understand the typical example of fruit as a base class and banana, orange, and pear as derived classes. But what about when there is only one property in common? Do you still use class ...

1 2
15 30 50 per page