Storing object in memory for using it in Business Layer

131 views Asked by At

I am working on a asp.net app with 3 layer architecture. (DAL, BL, PL) And I am using Entity Framework for working with the data. But I have this data file with about 80 columns and 110000 rows I don't want to save in the database. I deserialize it to a List (list of arrays of strings), because I need to get to a value immediately using 2 indexes(row and column) My question is: What is the best way to store this object in memory for me to use in the Business Layer?

1

There are 1 answers

2
Backs On BEST ANSWER

Storing in memory means you don't store it, because: 1. Your computer can be switched off, and you loose your data 2. ASP.NET application pool can be restarted, and you loose your data 3. Your application can get out of memory, and you loose your data

If you want to store it for a long time - store it in database of file storage. If you want to store it for a while, you can use Session or Application state