T
T
Tsiren Naimanov2015-02-26 10:30:56
SQL
Tsiren Naimanov, 2015-02-26 10:30:56

What is faster working with a database or with json (provided that the data is somewhere around 300 lines in the database)?

What is faster working with a database or with json (provided that the data will be somewhere around 300 lines in the database)?
For WinRT applications?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
T
Tsiren Naimanov, 2015-02-26
@ImmortalCAT

Uri dataUri = new Uri("ms-appx:///DataModel/TextFile1.txt");
            StorageFile file = await StorageFile.GetFileFromApplicationUriAsync(dataUri);
            IList<string> localList;
            localList = new List<string>();
            localList = await FileIO.ReadLinesAsync(file);
            for (int i = 0; i < localList.Count; i += 8)
            {
                commonWidget.Add(new Widget
                {
                    Id = Convert.ToInt32(localList[i]),
                    Name = localList[i+1],
                    Bithday = localList[i+2],
                    Description = localList[i + 4],
                    ImagePath = localList[i + 3],
                    Career = localList[i + 5]
                });
            }

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question