예제 #1
0
        public T[] GetAll()
        {
            List <T> models = new List <T>();

            string[] files = ModelConnectionHelpers.GetDirectoryFiles(dataDirectory);
            if (files == null)
            {
                return(models.ToArray());
            }

            foreach (string file in files)
            {
                models.Add((T)FSConnection.Read(file));
            }

            return(models.ToArray());
        }
예제 #2
0
        public T Get(int id)
        {
            string fullPath = GetFullPath(id);

            return((T)FSConnection.Read(fullPath));
        }