Example #1
0
        /// <summary>
        ///
        /// </summary>
        /// <typeparam name="T"></typeparam>
        /// <param name="json">Json formatted string.</param>
        /// /// <param name="ignore">Pass 'true' if want to match the fields name between Json and Generic type T else 'false'.</param>
        /// <returns></returns>
        public static List <T> ToGenericList <T>(string json, bool ignore)
        {
            var _list = ConvertToGenericList.ConvertDataTable <T>(json, ignore);

            return(_list);
        }
Example #2
0
        /// <summary>
        /// Convert DataTable into Generic List.
        /// </summary>
        /// <typeparam name="T">Generic type object.</typeparam>
        /// <param name="dataTable">DataTable</param>
        /// /// <param name="ignore">Pass 'true' if want to match the fields name between DataTable and Generic type T else 'false'.</param>
        /// <returns>List of generic type object.</returns>
        public static List <T> ToGenericList <T>(DataTable dataTable, bool ignore)
        {
            var _list = ConvertToGenericList.ConvertDataTable <T>(dataTable, ignore);

            return(_list);
        }