How to create FieldName const strings and Indexes
Posted: 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.
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.