Click here to Skip to main content
15,885,036 members
Home / Discussions / WPF
   

WPF

 
Questionwhat is the best way to save images to print in wpf Pin
neodeaths5-Jan-16 4:12
neodeaths5-Jan-16 4:12 
QuestionAdding icons to a ListView from an image list Pin
zahalul28-Dec-15 11:09
zahalul28-Dec-15 11:09 
AnswerRe: Adding icons to a ListView from an image list Pin
Richard Andrew x6428-Dec-15 14:39
professionalRichard Andrew x6428-Dec-15 14:39 
AnswerRe: Adding icons to a ListView from an image list Pin
Richard MacCutchan28-Dec-15 22:19
mveRichard MacCutchan28-Dec-15 22:19 
GeneralRe: Adding icons to a ListView from an image list Pin
zahalul30-Dec-15 9:17
zahalul30-Dec-15 9:17 
QuestionPassing Information to the Code behind Pin
Mycroft Holmes20-Dec-15 22:26
professionalMycroft Holmes20-Dec-15 22:26 
AnswerRe: Passing Information to the Code behind Pin
Pete O'Hanlon20-Dec-15 23:21
mvePete O'Hanlon20-Dec-15 23:21 
QuestionWhy do I need a connection string to use an Entity Framework data model? Pin
_T_C_20-Dec-15 7:23
_T_C_20-Dec-15 7:23 
I'm learning WPF. Over the past couple of days, I've worked my way through one-way binding, two-way binding, and list binding. For each of these, I created my own model classes to hold the data displayed on the window.

Now I'm tackling Entity Framework. Instead of using my own model classes, I want to use a data model created by the Entity Framework designer. I just tried it and it works beautifully. Even though it works, however, there is one thing I don't understand: Why does Visual Studio think I need a database?

For my simple test project, I'm not using any persistent data, and therefore I don't need a database. In my code, I create a Data Model Container and interact only with the in-memory version of the data (which I believe is done by specifying "Local" whenever referring to a table). Even though I don't need a database, Visual Studio kept giving me warnings related to the "Table Mapping" until I created one. After I created a database and connection string, everything worked properly with no errors or warnings.

As a test, I then deleted the database and changed the connection string in App.config to something bogus. Everything continued to work properly, indicating that the database and connection string are unused. It is only when I delete the connection string completely that I get errors again.

So my question is this: Why is Visual Studio insisting that I have a connection string which it obviously isn't using?

-TC

PS: I suppose this question is about Entity Framework more than WPF, but I came to the question through my research on WPF, so I hope it is appropriate for this forum. If not, let me know and I'll gladly repost elsewhere.
RantRe: Why do I need a connection string to use an Entity Framework data model? Pin
Mycroft Holmes20-Dec-15 12:14
professionalMycroft Holmes20-Dec-15 12:14 
GeneralRe: Why do I need a connection string to use an Entity Framework data model? Pin
_T_C_20-Dec-15 13:04
_T_C_20-Dec-15 13:04 
GeneralRe: Why do I need a connection string to use an Entity Framework data model? Pin
Mycroft Holmes20-Dec-15 19:23
professionalMycroft Holmes20-Dec-15 19:23 
AnswerRe: Why do I need a connection string to use an Entity Framework data model? Pin
Gerry Schmitz20-Dec-15 18:07
mveGerry Schmitz20-Dec-15 18:07 
AnswerRe: Why do I need a connection string to use an Entity Framework data model? Pin
_T_C_21-Dec-15 7:18
_T_C_21-Dec-15 7:18 
GeneralRe: Why do I need a connection string to use an Entity Framework data model? Pin
Gerry Schmitz23-Dec-15 11:29
mveGerry Schmitz23-Dec-15 11:29 
QuestionHow do I bind based on the value selected in a list box? Pin
_T_C_19-Dec-15 15:45
_T_C_19-Dec-15 15:45 
AnswerRe: How do I bind based on the value selected in a list box? Pin
_T_C_19-Dec-15 17:59
_T_C_19-Dec-15 17:59 
SuggestionRe: How do I bind based on the value selected in a list box? Pin
Richard Deeming4-Jan-16 3:55
mveRichard Deeming4-Jan-16 3:55 
QuestionRequest for help with simple WPF Pin
_T_C_18-Dec-15 11:14
_T_C_18-Dec-15 11:14 
AnswerRe: Request for help with simple WPF Pin
Gerry Schmitz18-Dec-15 11:34
mveGerry Schmitz18-Dec-15 11:34 
GeneralRe: Request for help with simple WPF Pin
_T_C_18-Dec-15 11:53
_T_C_18-Dec-15 11:53 
GeneralRe: Request for help with simple WPF Pin
Gerry Schmitz18-Dec-15 12:08
mveGerry Schmitz18-Dec-15 12:08 
GeneralRe: Request for help with simple WPF Pin
_T_C_18-Dec-15 12:42
_T_C_18-Dec-15 12:42 
GeneralRe: Request for help with simple WPF Pin
Gerry Schmitz18-Dec-15 12:57
mveGerry Schmitz18-Dec-15 12:57 
GeneralRe: Request for help with simple WPF Pin
_T_C_18-Dec-15 13:01
_T_C_18-Dec-15 13:01 
GeneralRe: Request for help with simple WPF Pin
Gerry Schmitz18-Dec-15 12:51
mveGerry Schmitz18-Dec-15 12:51 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.