public async Task<string> DeleteOneAssociation(CohortService cs, string associationId) { var result = await cs.DeleteStudentCohortAssociationById(associationId); return result.ToString(); }
/// <summary> /// Delete a StudentCohortAssociation object /// </summary> /// <param name="cs">service to use for this action</param> /// <param name="association">the StudentCohortAssociation to delete</param> /// <returns>result of this action</returns> public static async Task<ActionResponseResult> DeleteOneStudentCohortAssociation(CohortService cs, StudentCohortAssociation association) { var response = await cs.DeleteStudentCohortAssociationById(association.id); var student = (StudentDisplayObject)HttpContext.Current.Cache[association.studentId]; return GlobalHelper.GetActionResponseResult(association.studentId, student != null ? student.name : "", response, HttpStatusCode.NoContent); }