/// <summary> /// Execute a mapping from the model to a new entity /// </summary> /// <typeparam name="TEntity">Entity type</typeparam> /// <param name="model">Model to map from</param> /// <returns>Mapped entity</returns> public static TEntity ToEntity <TEntity>(this BusinessModel model) where TEntity : BusinessEntity { if (model == null) { throw new ArgumentNullException(nameof(model)); } return(model.Map <TEntity>()); }