Example #1
0
        /// <summary>
        /// Retrieves a list of all Mapping from the underlying data store via the configured DataProvider.
        ///A strongly typed list of Mapping entities is returned to the caller or an empty list if no records were found.  If an error occurs, an exception is thrown.
        /// </summary>
        /// <returns></returns>
        public static List <Mapping> GetMappings(MappingSearchParams mappingSearchParams, int startRowIndex, int maximumRows, string sortExpression)
        {
            List <Mapping> mappings  = new List <Mapping>();
            int            totalRows = 0;

            try
            {
                int rows;

                GetAllMappingSystems();
                GetMappingClassAssociations();
                GetMappingPropertyAssociations();

                mappings = CBO <Mapping> .FillCollection(DataAccessProvider.Instance().GetMappings(mappingSearchParams,
                                                                                                   startRowIndex,
                                                                                                   maximumRows,
                                                                                                   out rows),
                                                         FullyPopulate, true);

                totalRows = rows;
            }
            catch (Exception ex)
            {
                if (ExceptionPolicy.HandleException(ex, "Business Logic"))
                {
                    throw;
                }
            }
            count = totalRows;
            return(mappings);
        }
Example #2
0
 public static int GetMappingsCount(MappingSearchParams mappingSearchParams)
 {
     return(count);
 }