/// <summary> /// Create a new instance of <see cref="SupplierModel" /> from a <see cref="Supplier" /> /// </summary> /// <typeparam name="T">The type of instance to create</typeparam> /// <param name="source">The object to be transformed</param> /// <returns></returns> public static SupplierModel TransformTo <T>(this Supplier source) where T : SupplierModel { // create a new SupplierModel var target = new SupplierModel(); // update the SupplierModel with source target.UpdateFrom(source); // return updated target return(target); }