public static Newsletter RemoveReferences(this Newsletter item) { var obj = new Newsletter(); obj = item.RemoveReference(); if (item.User != null) { obj.User = new User(); obj.User = item.User.RemoveReference(); } return(obj); }