Example #1
0
        public bool ExportCsv(string fileName)
        {
            //Logger.LogTrace("RepositoryBase ExportCsv: " + GetType().FullName + "." + System.Reflection.MethodBase.GetCurrentMethod()?.Name);
            try
            {
                WriteCsvClassMap <TEntity, TClassMap> .Export(LoggerFactory, fileName, FindAll());

                return(true);
            }
            catch (Exception ex)
            {
                Logger.LogError(ex, GetType().FullName + "." + System.Reflection.MethodBase.GetCurrentMethod()?.Name + ": " + ex.Message);
            }

            return(false);
        }
Example #2
0
        public void ExportCsvClassMap()
        {
            var result = WriteCsvClassMap <Dto.TestClassPrivateSetter, ClassMap.TestClassPrivateSetter> .Export(_loggerFactory, @"C:\temp\Test.csv", _list);

            Assert.NotNull(result);
        }