public static T[] ParseTable()
    {
        string fullName = string.Format(TABLE_PATH, typeof(T));

        T[] data = CSVHelper.Parse <T>(fullName, PROPERTY_ROW);
        return(data);
    }
Beispiel #2
0
        public FileStatus Upload(IFormFile file, List <TransactionImport> imports)
        {
            string ext = Path.GetExtension(file.FileName);

            if (ext.ToLower().Equals(".csv"))
            {
                return(CSVHelper.Parse(file, imports));
            }
            else if (ext.ToLower().Equals(".xml"))
            {
                return(XMLHelper.Parse(file, imports));
            }
            else
            {
                return(FileStatus.Fail);
            }
        }