I create two C# Classes Contacts and Customers based on SQL diagram (see the image)
just I want see if I am doing it right and I need some advice ? down database diagram and Classes Customer and Contacts

Customer Class
public class Customer
{
public int CustomerID { get; set; }
public string Title { get; set; }
public string FirstName { get; set; }
public string LastName { get; set; }
public string Postion { get; set; }
public Char Gender { get; set; }
public DateTime BecomeCustomer { get; set; }
public DateTime ModifiedDate { get; set; }
public Customer() { }
public static bool AddNewCustomer_Contact(Customer cust,Contacts cont)
{
try
{
// get a configured DbCommand object
DbCommand comm = GenericDataAccess.CreateCommand();
//Set the store Proc name
comm.CommandText = "AddNewCustomer_Contact";
//create new parameter @Title
DbParameter param = comm.CreateParameter();
param = comm.CreateParameter();
param.ParameterName = "@Title";
param.Value = cust.Title;
param.DbType = DbType.StringFixedLength;
comm.Parameters.Add(param);
//create new parameter @FirstName
param = comm.CreateParameter();
param.ParameterName = "@FirstName ";
param.Value = cust.FirstName;
param.DbType = DbType.StringFixedLength;
comm.Parameters.Add(param);
//create new parameter @LastName
param = comm.CreateParameter();
param.ParameterName = "@LastName";
param.Value = cust.LastName;
param.DbType = DbType.StringFixedLength;
comm.Parameters.Add(param);
//create new parameter @Postion
param = comm.CreateParameter();
param.ParameterName = "@Postion ";
param.Value = cust.Postion;
param.DbType = DbType.StringFixedLength;
comm.Parameters.Add(param);
//create new parameter @BecomeCustomer
param = comm.CreateParameter();
param.ParameterName = "@BecomeCustomer";
param.Value = DateTime.Now;
param.DbType = DbType.DateTime;
comm.Parameters.Add(param);
//create new parameter @Gender
param = comm.CreateParameter();
param.ParameterName = "@Gender";
param.Value = cust.Gender;
param.DbType = DbType.String;
comm.Parameters.Add(param);
//create new parameter @ModifiedDate
param = comm.CreateParameter();
param.ParameterName = "@ModifiedDate";
param.Value = DateTime.Now;
param.DbType = DbType.StringFixedLength;
comm.Parameters.Add(param);
//create new parameter @LabelContactTypeID
param = comm.CreateParameter();
param.ParameterName = "@LabelContactTypeID";
param.Value = cont.LabelContactTypeID;
param.DbType = DbType.StringFixedLength;
comm.Parameters.Add(param);
//create new parameter @ContactDetails
param = comm.CreateParameter();
param.ParameterName = "@ContactDetails";
param.Value = cont.ContactDetail;
param.DbType = DbType.StringFixedLength;
comm.Parameters.Add(param);
//create new parameter @Status
param = comm.CreateParameter();
param.ParameterName = "@Status";
param.Value = cont.Status;
param.DbType = DbType.StringFixedLength;
comm.Parameters.Add(param);
//create new parameter @Notes
param = comm.CreateParameter();
param.ParameterName = "@Notes";
param.Value = cont.Notes;
param.DbType = DbType.StringFixedLength;
comm.Parameters.Add(param);
return (GenericDataAccess.ExecuteNonQuery(comm) != -1);
}
catch
{
return false;
}
}
}
Contact Class
public class Contacts
{
public int ContactsID { get; set; }
public int CustomerID { get;set; }
public string ContactDetail { get; set; }
public bool Status { get; set; }
public int LabelContactTypeID { get; set; }
public string Notes { get; set; }
}
While designing a class, the first step would be to identify what classes are needed and what are their attributes/responsibilities. From what I understand, the only high level class that you want to represent is a Customer. By Customer being your high level class, I mean that some attributes of Customer can be constituted by other objects (like Name, Contacts, etc.).
In addition, some fields like Id are not of any significance outside the database (I assume that the Id in this case is the primary key of your Customer table). If you are bent on basing your class model on the database design (normalized one), then I would suggest that you ‘unnormalize’ your design before proceeding on with the class model. The optimization offered by normalization is only within the scope of a relationship model and usually should not extend to a class which is an in memory representation.
Furthermore, as suggested by @Yatrix, it would be better to abstract the data access layer from the actual data model.
Here are some suggestions,