/// <summary> /// Overrides to response html content when accessing the "http://host/api/excel" url in the browser. /// </summary> /// <returns>The html content.</returns> public override IActionResult Get([FromQuery] ExcelRequest re) { if (C1Controller.IsIntroductionRequest(this)) { return(C1Controller.GetIntroductionPageResult(this, GetExcel())); } return(base.Get(re)); }
public override async Task GetAllStudentsFromExcel(ExcelRequest request, IServerStreamWriter <StudentModel> responseStream, ServerCallContext context) { List <StudentModel> students = GetAllStudents(request.FilePath); foreach (StudentModel student in students) { await responseStream.WriteAsync(student); } }