public static List <clsVersionList> getVesionList(clsVersionInput input) { try { MySqlParameter[] param = new MySqlParameter[1]; param[0] = new MySqlParameter("?p_type", input.Type); var Result = _DbTouchbase.ExecuteStoreQuery <clsVersionList>("CALL MobileAPI_VersionControllist(?p_type)", param).ToList(); return(Result); } catch (Exception ex) { throw ex; } }
//private static TouchBaseWebAPI.Data.row_productionEntities _DbTouchbase = new TouchBaseWebAPI.Data.row_productionEntities(); public static List <clsVersionList> getVesionList(clsVersionInput input) { try { MySqlParameter[] param = new MySqlParameter[1]; param[0] = new MySqlParameter("?p_type", input.Type); using (TouchBaseWebAPI.Data.row_productionEntities context = new TouchBaseWebAPI.Data.row_productionEntities()) { context.Connection.Open(); var Result = context.ExecuteStoreQuery <clsVersionList>("CALL MobileAPI_VersionControllist(?p_type)", param).ToList(); return(Result); } } catch (Exception ex) { throw ex; } }
public object GetVersionList(clsVersionInput Input) { dynamic TBVersionResult; try { List <clsVersionList> Result = version.getVesionList(Input); if (Result != null) { TBVersionResult = new { status = "0", message = "success", Result }; } else { TBVersionResult = new { status = "0", message = "Record not found" }; } } catch { TBVersionResult = new { status = "1", message = "failed" }; } return(new { TBVersionResult }); }