Search found 27 matches

by johnwest80
Thu 13 Jun 2013 18:45
Forum: Entity Developer
Topic: Having data annotations automatically added to properties
Replies: 2
Views: 1351

Re: Having data annotations automatically added to properties

So I found the setting in the XML file.

<ValidationFramework>DataAnnotations</ValidationFramework>

Where is this setting in the UI? Thx.
by johnwest80
Thu 13 Jun 2013 18:34
Forum: Entity Developer
Topic: Having data annotations automatically added to properties
Replies: 2
Views: 1351

Having data annotations automatically added to properties

I'm dumb. There, I said it. I can't find the setting to have data annotation attributes added to my object properties when updating my model from the database. I have two projects in my solution, both with a model within them. For a test, I added a new table to each database called TestTable, with a property called "Name". The model in project A does create the following attributes on the properties:

Code: Select all

        [EdmScalarPropertyAttribute(EntityKeyProperty=true, IsNullable=false)]
        [DataMemberAttribute()]
        [System.ComponentModel.DataAnnotations.Key]
        [System.ComponentModel.DataAnnotations.StringLength(50)]
        [System.ComponentModel.DataAnnotations.Required()]
        public string Name
The model in project B does not...

Code: Select all

        [EdmScalarPropertyAttribute(EntityKeyProperty=true, IsNullable=false)]
        [DataMemberAttribute()]
        public string Name
I know this has got to be something simple. But I have the System.ComponentModel.DataAnnotations v4.0.0 added to each model's attributes list.

What am I missing?

Thx for the help. I know I'm going to feel stupid when you tell me :).
by johnwest80
Thu 25 Oct 2012 16:26
Forum: Entity Developer
Topic: Open edmx - forced to save as edml
Replies: 7
Views: 2626

Re: Open edmx - forced to save as edml

I just sent the email. I look forward to hearing back with a solution.
by johnwest80
Thu 18 Oct 2012 21:32
Forum: Entity Developer
Topic: Open edmx - forced to save as edml
Replies: 7
Views: 2626

Re: Open edmx - forced to save as edml

I can send you the actual edmx file. How should I get it to you?
by johnwest80
Thu 11 Oct 2012 19:14
Forum: Entity Developer
Topic: Open edmx - forced to save as edml
Replies: 7
Views: 2626

Re: Open edmx - forced to save as edml

And btw, I'm on version 4.7.277, so the version shouldn't have anything to do with it.
by johnwest80
Thu 11 Oct 2012 19:11
Forum: Entity Developer
Topic: Open edmx - forced to save as edml
Replies: 7
Views: 2626

Re: Open edmx - forced to save as edml

This answer doesn't help me. Because you've changed your software and are forcing some new file format, I'm getting this error:

The number of members in the conceptual type 'Model.MyItem' does not match with the number of members on the object side type 'Model.MyItem'. Make sure the number of members are the same.

I can only get around it by forcing a save as edmx.

I need a solution.
by johnwest80
Fri 24 Aug 2012 05:33
Forum: Entity Developer
Topic: Open edmx - forced to save as edml
Replies: 7
Views: 2626

Open edmx - forced to save as edml

So this could very well be me. Here's my scenario:

I have an edmx file that I've been opening outside of VS and updating. In the past, when I've saved it, it has saved as the same edmx file I opened. Now, however, when I save, it's trying to force me to save as an edml file instead. I have to manually go change the extension each time back to edmx instead of edml. If I do save it as an edml, I get a weird error. * Note I'm not asking for a solution on how to get an edml to work - I'm asking for how to get back to saving it as the same edmx file I opened. Thx. *

Does this sound familiar? I'm not sure what changed on my end.
by johnwest80
Wed 25 Apr 2012 13:29
Forum: Entity Developer
Topic: Overwrite prompt - how to disable being asked every time
Replies: 5
Views: 1682

I am using the latest version of standalone entity developer, vs2010 sp1, and windows 7 64-bit. The same issue occurs whether running as admin or not.

To reproduce:

Open model
Make a change (move an entity in the diagram, etc)
Hit Control-S

That's it. Instead of just silently saving the file, it gives me a file dialog box with the existing name filled in. Then, when I hit enter, it tells me the file already exists and asks me if I want to override.

Please, before you ask me more questions, can you confirm that you do the following, and it *doesn't* ask you to confirm the save?
Shalex wrote:1. Please specify the exact text of the prompt message(-s) you are getting.
2. Which operating system is installed on your workstation? If it is Windows7, try running Entity Developer with the As Administrator option. Does it help?
by johnwest80
Wed 08 Feb 2012 15:28
Forum: Entity Developer
Topic: EF no longer identifying default value getdate() and newId()
Replies: 1
Views: 1597

EF no longer identifying default value getdate() and newId()

A while back, you changed ed to automatically recognize when a uniqueidentifier field was primary key and set to newid(), and automatically set the field appropriately. You also recognized when a datetime field was automatically set to getdate().

Well, I just updated from database for the first time in a while, and these fields didn't get set correctly. It's back to what it was before you changed ed.

Is there a chance you somehow removed that from the latest build? I know you'd like to have version #s and all that from when it worked and when it didn't, but I don't remember when you made the changes, and it's possible it's been a couple of releases since i did an update from db. So I can't tell you for sure. I'm currently using ed standalone 4.2.110.

Can you check into it and see if it should still be working?
by johnwest80
Wed 08 Feb 2012 15:24
Forum: Entity Developer
Topic: Overwrite prompt - how to disable being asked every time
Replies: 5
Views: 1682

I'm using standalone entity developer.

I can click the save button, save all button, or type control-s or shift-control-s. Each time it gives me the file dialog with the current file specified, and when i hit enter to save, it makes me confirm.

Visual Studio 2010 version 10.0.40219.1 sp1rel

ED version 4.2.110
by johnwest80
Wed 25 Jan 2012 17:31
Forum: Entity Developer
Topic: Add Enum missing
Replies: 1
Views: 1257

Add Enum missing

I feel like an idiot, but I can't figure out how to add an enum. I read the documentation, and it states:

"In the Model Explorer window, right-click the Enum Types node and select the Add Enum Type command from the drop-down menu or, alternatively, click the Add Enum Type button on the toolbar of the Model Explorer window."

However, I don't have an Enum Types node or a button in the toolbar. I have the latest version of EF from 1/12/12, so that's not the problem.

Can anyone tell me why I don't see the option to add an enum?

While I'm asking, is there a way to point to an existing enum elsewhere in my code, rather than creating a new one. This one might become obvious once I figure out the first question, but I'd like to know for sure it's possible.

Thx.
by johnwest80
Wed 25 Jan 2012 13:58
Forum: Entity Developer
Topic: Overwrite prompt - how to disable being asked every time
Replies: 5
Views: 1682

Overwrite prompt - how to disable being asked every time

I'm asked if I want to overwrite every time I save my model. Is there a way to stop this? I looked in options and didn't see anything.
by johnwest80
Thu 05 Jan 2012 17:42
Forum: Entity Developer
Topic: How to set "preferred validation framework"?
Replies: 3
Views: 1402

Perfect! Just needed to be pointed in the right direction.

Any thoughts about adding some additional data annotation attributes to the entity properties themselves? I'm sure these fields, like name and description, could be used by nhibernate and other frameworks as well for generating error messages. Thoughts?
by johnwest80
Thu 05 Jan 2012 17:20
Forum: Entity Developer
Topic: How to set "preferred validation framework"?
Replies: 3
Views: 1402

How to set "preferred validation framework"?

The release notes for the latest version mention that

"You just need to select the preferred validation framework and set validation parameters, such as max value, min value, max length, min length, regular expression, or to select one of the predefined property formats. After this Entity Developer will generate validation attributes for entity properties in the generated code".

This must be obvious, but I can't find where to select it. Or else I'm doing something else wrong. I'm setting min/max lengths on the EntityProperties, but they're not being honored in my gui. However, if I manually go set the DataAnnotation attributed in ED, that works.

Also, on another note, being able to specify a friendly name and description for each EntityProperty would be very helpful, too. I'm currently doing this in DataAnnotations.

John
by johnwest80
Thu 22 Sep 2011 14:21
Forum: Entity Developer
Topic: Not sure where to download update to licensed ED version?
Replies: 1
Views: 1234

Not sure where to download update to licensed ED version?

I'm not sure where to download the latest version of ED. I'm a licensed user, and only see the free or trial versions. How do I upgrade the licensed version?