public ENResult search() { try { using (erpStoreEntities db = new erpStoreEntities()) { List <uspGEProductPriceSearch_Result> result = db.uspGEProductPriceSearch(PUser, PReturnCode, PReturnMessage).ToList(); return(new ENResult(Convert.ToInt32(PReturnCode.Value), Convert.ToString(PReturnMessage.Value), result)); } } catch (Exception ex) { return(PUnexpectedError(ex)); } }