This thread looks to be a little on the old side and therefore may no longer be relevant. Please see if there is a newer thread on the subject and ensure you're using the most recent build of any software if your question regards a particular product.
This thread has been locked and is no longer accepting new posts, if you have a question regarding this topic please email us at support@mindscape.co.nz
|
I am trying to evaluate LightSpeed 3.1 and test it out to see if it's something that will meet our needs. As part of a proof of concept I am trying to setup a class called 'LabRequest'. From what I understand LightSpeed automatically attempts to load 'Id' column from the associated database table as a field/property in the class. Unfortunately my database does not have a field named 'Id' instead it has 'LRID' as the primary key. I am trying to set the ColumnAttribute using the syntax below but I am still receiving an error: Invalid column name 'Id'. My class definition (see line 5): Code Snippet
I will really appreciate it if someone can guide me in the right direction to get this test sample work. Thanks. |
|
|
I figured out the solution to my own problem, I used the visual designed and then looked at the source code:
namespace ClassLibrary2 { [Table(IdColumnName = "LRID")] public class LabRequest : Entity<int> { private int _LRNumber; private int _Customer_number; private string _Division;
public int LRNumber { get { return _LRNumber; } set { Set(ref _LRNumber, value); } } public int Customer_number { get { return _Customer_number; } set { Set(ref _Customer_number, value); } } public string Division { get { return _Division; } set { Set(ref _Division, value); } } } } |
|