NPersistence - .NET Persistence API

Step 5 - Create the persistent class

You are here

  • Right click on the ‘code’ folder node, click ‘Add New Item…’
  • In the opened dialog, choose 'Class', name it Employee.cs and click Add.

  • Go to the newly created Employee class and paste the following code into it:
using NPersistence;
[Entity]
public class Employee
{
    [Id]
    public virtual string ID { get; set; }
    [Basic]
    public virtual string FirstName { get; set; }
    [Basic]
    public virtual string LastName { get; set; }
}

 Next: Step 6 - Create a utility class