Fetch default values from DB

Discussion of open issues, suggestions and bugs regarding Entity Developer - ORM modeling and code generation tool
Post Reply
figueiredorj
Posts: 41
Joined: Fri 12 Apr 2013 19:05

Fetch default values from DB

Post by figueiredorj » Mon 24 Jul 2017 09:11

Hi,
I would like to fech default values from collumns in db and apply it to properties (constructor).

Is this possible? how?

Thanks

Shalex
Site Admin
Posts: 9543
Joined: Thu 14 Aug 2008 12:44

Re: Fetch default values from DB

Post by Shalex » Tue 25 Jul 2017 18:43

You are using Database First approach with Devart Entity Model (*.edml), aren't you?

When adding a table to the model, Default Value of StorageColumn in SSDL and Default Value of EntityProperty in CSDL are initialized with the default value of the column in database.

figueiredorj
Posts: 41
Joined: Fri 12 Apr 2013 19:05

Re: Fetch default values from DB

Post by figueiredorj » Wed 26 Jul 2017 14:12

Hi,
yes.. I am using database first aproach with entity framework;
However when adding tables fro sql where some collumns have default values applied... it is not replicated on model side.

thanks

Shalex
Site Admin
Posts: 9543
Joined: Thu 14 Aug 2008 12:44

Re: Fetch default values from DB

Post by Shalex » Wed 26 Jul 2017 16:28

Please specify:
1) the name and version of your target database server
2) the DDL script of a sample table for reproducing the issue

Post Reply