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