getting started - AlienEngineer/VirtualObjects GitHub Wiki

Create a Model

public class Employee 
{
    public String EmployeeId { get; set; }
    public String LastName { get; set; }
    // Other fields ...
}

Config the Connection

  <connectionStrings>
    <clear/>
    <add name="YourMachineName" 
         providerName="System.Data.SqlClient" 
         connectionString="
               Data Source=.\instance;
               Initial Catalog=db;
               Integrated Security=true"/>
  </connectionStrings>

Use it!

   using (var session = new Session())
   {
      IQueryable<Employee> employees = session.GetAll<Employee>()
        .Where(e => e.BirthDate.Year > 1983);
      
      session.Insert(new Employee 
      {
         Name = "I'm the new guy!"
      });
   }
⚠️ **GitHub.com Fallback** ⚠️