YouareemployedasaWebApplicationDeveloperatCertkiller.com.YoumakeuseofMicrosoft.NETFrameworkv3.5tocreateanASP.NETapplication.Youcreateaclassintheapplicationthatcontainsthecodebelow.(Thelinenumbersisincludedforreferencepurposes)01publicobjectGetCachedProducts(sqlConnectionconn){0203if(Cache[products]==null){04SqlCommandcmd=newSqlCommand(SELECT*FROMProducts,conn);05conn.Open();06Cache.Insert(products,GetData(cmd));07conn.Close();08}09returnCache[products];10}1112publicobjectGetData(SqlCommandprodCmd){1314}YounoticethattheGetCachedProductsmethodiscalledtoprovidethislistfromtheCacheobjecteverytimeaWebformhastoaccessalistofproducts.ToensureproductivitymanagementwantsyoutomakesurethatthereisalwaysalistofproductsavailableintheCacheobject.Youthusneedtodeterminetheappropriatecodethatshouldbeaddedinline13.Whatshouldyouidentify?()
YouareemployedasaWebApplicationDeveloperatCertkiller.com.YoumakeuseofMicrosoft.NETFrameworkv3.5tocreateanASP.NETapplication.
Youcreateaclassintheapplicationthatcontainsthecodebelow.(Thelinenumbersisincludedforreferencepurposes)
01publicobjectGetCachedProducts(sqlConnectionconn){
02
03if(Cache["products"]==null){
04SqlCommandcmd=newSqlCommand("SELECT*FROMProducts",conn);
05conn.Open();
06Cache.Insert("products",GetData(cmd));
07conn.Close();
08}
09returnCache["products"];
10}
11
12publicobjectGetData(SqlCommandprodCmd){
13
14}
YounoticethattheGetCachedProductsmethodiscalledtoprovidethislistfromtheCacheobjecteverytimeaWebformhastoaccessalistofproducts.ToensureproductivitymanagementwantsyoutomakesurethatthereisalwaysalistofproductsavailableintheCacheobject.Youthusneedtodeterminetheappropriatecodethatshouldbeaddedinline13.
Whatshouldyouidentify?()