Click here to Skip to main content
15,884,177 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Hello everyone

I am new to coding in C#, and i am trying to correctly code in the MVVM pattern using WPF with my MySQL database.

I have a form called characters with a combobox called cb_Names. The idea is ones the form is loaded the combobox gets populated with the names of the characters from my database. How do i get this done?

In the database this would be called:

SQL
Select Name_ FROM dark_heresy.character_;


I know have to create a class that does this but how should it look like? could someone please give me an example, perhaps by using the information i given.

The database has been linked to project by using the Entity Framework, and the solution explorer looks like this:

<img src="http://i1183.photobucket.com/albums/x467/nicegirl_11/CSharp/ModelOrnot_zps7384e215.png" border="0" alt=" photo ModelOrnot_zps7384e215.png"/>
Posted

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900