How do I find a graphic card that suits a specific motherboard?
You can use a site like PC Part Picker where you specify your motherboard and then will only show you CPU's, graphics cards, and other components that are compatible. You can also do some research about the specific motherboard and learn what expansion slots it has. After that knowledge is found you can research graphics cards based on the size of your case, size of your PSU, and support for PCI Express 2.0 or PCI Express 3.0. You can read more about PCI Express here.
Related videos on Youtube
Angel Gonzalez Pena
Updated on September 18, 2022Comments
-
Angel Gonzalez Pena over 1 year
I am using System.Runtime.Caching to persist variables in cache, but later i cannot access to them because are disposed and the program throws a
ObjectDisposedException
with the message:DbContext has been disposed
I didn't execute
Object.Dispose()
, so the classObjectCache
are disposing it in background.In what moment at what moment does it happen? after doing cache.add?
It can be avoided?
How i made it:
Making the list:
using (GesBrokerSuiteEntities ctx = new GesBrokerSuiteEntities()) { rel_tareas_orquestador nuevoregistroOrquestador = new rel_tareas_orquestador(); nuevoregistroOrquestador.id_robot_hija = idProyindividual; nuevoregistroOrquestador.id_robot_padre = 2; nuevoregistroOrquestador.id_robot_tarea_padre = "2"; nuevoregistroOrquestador.id_robot_tarea_hija = idProyindividual - 1+""; nuevoregistroOrquestador.id_tarea_hija = Int32.Parse(id2); nuevoregistroOrquestador.id_tarea_padre = 2; nuevoregistroOrquestador.sincronizada = 2; nuevoregistroOrquestador.esperar_padre_completa = 2; ctx.rel_tareas_orquestador.Add(nuevoregistroOrquestador); listaRelTareasOrquestador.Add(ctx);
1-Adding the list to cache
CacheItemPolicy cacheItemPolicy = new CacheItemPolicy(); cacheItemPolicy.AbsoluteExpiration = DateTime.Now.AddHours(1.0); cache.Add("listaOrquestador", listObject, cacheItemPolicy);
2-Then i get it in another method
listaRelTareasOrquestador = (List<GesBrokerSuiteEntities>)cache.Get("listaOrquestador");
After this, i cannot access to the content of the list because it disposed.
UPDATE: withing the using() works, the elements aren't disposed.
now the problem us this, when trying to get the saved values, it obtains the database rows:
nuevoregistroOrquestador.id_robot_hija = listaRelTareasOrquestador[0].rel_tareas_orquestador.FirstOrDefault().id_robot_hija;
I know it is executing a query in my DB, any way to obtain the data i saved previously? Like a local variable.
UPDATE 2
Now when i'm trying to access the values into the list,i am not receving the previous ones:
rel_tareas_orquestador nuevoregistroOrquestador = new rel_tareas_orquestador(); nuevoregistroOrquestador.id_robot_hija = listaRelTareasOrquestador[0].rel_tareas_orquestador.FirstOrDefault().id_robot_hija; nuevoregistroOrquestador.id_robot_padre = registro.rel_tareas_orquestador.FirstOrDefault().id_robot_padre; nuevoregistroOrquestador.id_robot_tarea_padre = registro.rel_tareas_orquestador.FirstOrDefault().id_robot_tarea_padre; nuevoregistroOrquestador.id_robot_tarea_hija = registro.rel_tareas_orquestador.FirstOrDefault().id_robot_tarea_hija;
I know the methods are returning database values due to querys, how i can access to the list values i saved previously?
Visual Studio shows me that in debugging:
-
Bon Gart over 10 yearsHardware recommendations are off topic. That said, do you understand anything about the specifications detailed on the page you linked to? The Specs clearly say "1 x PCI Express x16 Gen2.0 slot" which means you can get a PCI Express video card... which covers just about all current and modern video cards. So based on the information you have provided (and have access to) you should search for a PCI Express video card. I suspect however, that this is not what you meant, and that you want specific card recommendations.
-
Shekhar over 10 years@BonGart he is not exactly looking for recommendations so its not off topic
-
Bon Gart over 10 years@Shakehar I hope you are right. I did notice the OP asking for what type of card should be searched for, but since that information was in the specifications on the link the OP provided in the question, it felt like he was asking for more than just the type.
-
Ƭᴇcʜιᴇ007 over 10 yearsOP's asking how to pick the right card to fit, not asking which card he should buy, so it's not a product recommendation IMO.
-
Fildor over 3 yearsWe know nothing about your cache. Please add config/setup and maybe some code (usage example)?
-
Fildor over 3 yearsI suspect, you are using some Linq with deferred execution. Then you add the query to the cache. That means, the dbContext can be disposed while the query is sitting in cache and by the time you execute the query, it will fail. Execute the query at once and cache its result.
-
Fildor over 3 yearsPlease add how you construct your
listObject
. -
mjwills over 3 years
so the class ObjectCache are disposing it in background.
No it isn't. Unless you are doing something like stackoverflow.com/a/32706574/34092 . -
Fildor over 3 years^^ By using
using
you explicitly dispose it. That's how that works. -
Angel Gonzalez Pena over 3 years@mjwills seeing the duplicate and your comments i think i know how solve the problem, thanks!
-
Angel Gonzalez Pena over 3 years@Fildor ok, then i would try to persist the list without the using, right? Gonna try, thanks!
-
mjwills over 3 yearsCan you explain to us why you want to keep the
ctx
? We can help you do it - sure. But it is weird to want to do it. It is like asking how to light matches with the side of your face - possible, but probably suggesting you are attacking the wrong problem. -
Angel Gonzalez Pena over 3 years@mjwills i don't want to keep the ctx anymore, the previous problem is solved, thx! Now one little doubt. Would it be possible to access the values that I stored manually in the list, and not those of the database? I updated the question, i know it's executing query against the table, but i want to know if it possible to store only the values I want, without obtain all the rows. Like a local variable.
-
Angel Gonzalez Pena over 3 years@mjwills I added an "update 2" due to I can't access that way
-
-
Angel Gonzalez Pena over 3 yearsI updated the post and wrote how i did it, the problem is when i call the Get method, before the using, the list elements are already disposed.
-
mjwills over 3 yearsYes you can do that.