1
I am developing an application, where one of the modules is the registration of products, and within this register, I have the tax part.
In this fiscal part, I have to define an NCM, and according to the IPI rate, so I prepared a table with NCM code, description and aliquot, but my table was 10029 records.
my doubt is, or even better, what would be your suggestions, about loading this table once per system section?
Would have a classe static
, similar to this:
public static class Cidades
{
private static DataTable _tableCidade;
public static DataTable Tablecidade
{
get { return Cidades._tableCidade; }
set { Cidades._tableCidade = value; }
}
}
that when logging into the system, the datatable
, with this table of ncm and aliquotas ipi.
what do you think?
In analysis, of memory consumption, I had an increase of 5 Mb in consumption, in question of speed, I felt no difference between charging it at the beginning or not charging.
Note: Ah who interested, I can make this available in SQL language with the latest updated version taken from the official website of the recipe.
I advise you not to use Sessions for this purpose, what you want is to create data caching, and for this there is Redis http://www.codeproject.com/Articles/636730/Distributed-Caching-using-Redis
– Pablo Tondolo de Vargas
um.. I’ll read about thank you.
– Thomas Erich Pimentel