none
Database design method

    Question

  • Hello,

    For some time, I was accustomed with design method that fetch data from database tables and fill some class with it. In other words, this class manage their part of data,  could Load, Modify and other so. all is encapsulated.

    My question is: What is the best model of design in C# with all those bindings and datasets features. Is it good to store data in datasets, or mayby use it only for temporary storage?

    Please some links if you have. Thanks.
    Monday, August 17, 2009 8:27 PM

Answers

  • Entity Modelling may be what you're after.  I think you should do one of the LINQ to SQL tutorials as a first exposure.  You can add an ADO.NET Entity Data Model to your project, or the LINQ to SQL classes .  (Project/Website > Add New Item > ~) This will define classes that match the schema of your database and allow you to make object style access to your database.  You'll feel like you have objects.  And you can use LINQ on them!

    Oh, and you wanted some links
    • Edited by Wyck Monday, August 17, 2009 9:03 PM added a link
    • Marked as answer by paperboy77 Tuesday, August 18, 2009 5:00 PM
    Monday, August 17, 2009 9:00 PM
  • You can also do object binding. So you can follow your design method and bind List<Customer> to a dataGridView, for example.

    I have a set of sample code that demonstrates object binding here:

    http://www.insteptech.com/techLibrary/samplecode.htm

    Hope this helps.
    www.insteptech.com ; msmvps.com/blogs/deborahk
    We are volunteers and ask only that if we are able to help you, that you mark our reply as your answer. THANKS!
    • Marked as answer by paperboy77 Tuesday, August 18, 2009 5:00 PM
    Monday, August 17, 2009 9:37 PM

All replies

  • Entity Modelling may be what you're after.  I think you should do one of the LINQ to SQL tutorials as a first exposure.  You can add an ADO.NET Entity Data Model to your project, or the LINQ to SQL classes .  (Project/Website > Add New Item > ~) This will define classes that match the schema of your database and allow you to make object style access to your database.  You'll feel like you have objects.  And you can use LINQ on them!

    Oh, and you wanted some links
    • Edited by Wyck Monday, August 17, 2009 9:03 PM added a link
    • Marked as answer by paperboy77 Tuesday, August 18, 2009 5:00 PM
    Monday, August 17, 2009 9:00 PM
  • You can also do object binding. So you can follow your design method and bind List<Customer> to a dataGridView, for example.

    I have a set of sample code that demonstrates object binding here:

    http://www.insteptech.com/techLibrary/samplecode.htm

    Hope this helps.
    www.insteptech.com ; msmvps.com/blogs/deborahk
    We are volunteers and ask only that if we are able to help you, that you mark our reply as your answer. THANKS!
    • Marked as answer by paperboy77 Tuesday, August 18, 2009 5:00 PM
    Monday, August 17, 2009 9:37 PM