public class Employee
{
public String EmployeeId { get; set; }
public String LastName { get; set; }
// Other fields ...
}
<connectionStrings>
<clear/>
<add name="YourMachineName"
providerName="System.Data.SqlClient"
connectionString="
Data Source=.\instance;
Initial Catalog=db;
Integrated Security=true"/>
</connectionStrings>
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!"
});
}