public static void Main()
Console.WriteLine("Save Record Example");
var record=SaveRecord(()=>{
var myRecord=new MyRecord(){Id=1,Name="xpto"};
Console.WriteLine(record.ToString());
public static MyRecord SaveRecord(Func<MyRecord> init)
record.Created=DateTime.Now;
public string Name {get;set;}
public DateTime Created {get;set;}
public override string ToString()
return string.Format("Name {0} created on {1} with Id {2}.",this.Name,this.Created,this.Id);