How to create FieldName const strings and Indexes

Discussion of open issues, suggestions and bugs regarding Entity Developer - ORM modeling and code generation tool
Post Reply
MarkLFT
Posts: 1
Joined: Tue 04 Sep 2018 01:36

How to create FieldName const strings and Indexes

Post by MarkLFT » Tue 04 Sep 2018 02:04

We currently use Lightspeed ORM, and have been for a number of years. But we are now looking towards using EF Core with Entity Developer for our ORM toolkit. There is however as couple of items I m having issues with.

Firstly, when Lightspeed created the classes, for each of the public properties, then also created a public const string with the field name. e.g.

public string GuestName { get; set; }
public const string GuestNameField = "GuestName"; <--- This is what I need

What I want to know, is , is there a way to create these without me getting in to modifying templates?

Secondly, I have created a database first model, but it did not seem to import any indexes. Our database has a lot of tables, and each has two or three indexes to improve performance, do I need to code all of these manually?

Many thanks for your help.

Pinturiccio
Devart Team
Posts: 2357
Joined: Wed 02 Nov 2011 09:44

Re: How to create FieldName const strings and Indexes

Post by Pinturiccio » Fri 07 Sep 2018 13:58

MarkLFT wrote:What I want to know, is , is there a way to create these without me getting in to modifying templates?
The only way is to edit a template.
MarkLFT wrote:Secondly, I have created a database first model, but it did not seem to import any indexes. Our database has a lot of tables, and each has two or three indexes to improve performance, do I need to code all of these manually?
Entity Developer retrieves the information only for unique indexes. In practice, database indexes, that are not unique, but created for improving performance, usually have a lot of different parameters set, not just a column list. Full-featured support for them is outside of the scope of ORM designer features, because ORMs don't use this information.

Post Reply