public static BannerTemplate From(BannerTemplateEntity entity) { var row = ValueHelper.CopyData(entity, new BannerTemplate(), 1); //row.Variables = entity.Variables; return(row); }
public static T2 Assign <T2>(object from, Action <T2> init) where T2 : class, new() { var to = new T2(); ValueHelper.CopyData(@from, to); init(to); return(to); }