With PostSharp4ET, enabling persistency on a class should be as easy as decorating it with a custom attribute:
[Poco("ConnectionName")] public class Person { public int PersonID { get; set; } public string Firstname { get; set; } public string Lastname { get; set; } }
Under the hood, EF-specific interfaces are implemented automatically at build time.
Ruurd explains everything extensively on his blog. And even if you are not interested in Microsoft Entity Framework, Ruurd's blog is a great introduction to how to write more complex aspect libraries with PostSharp.
Thank you Ruurd for this excellent work!