예제 #1
0
        public async Task <ActionResult> ViewAssign(int?id)
        {
            if (id != null)
            {
                var assignment = await _assignmentService.FindByIdAsync(id.Value);

                if (assignment != null)
                {
                    return(File(Server.MapPath(assignment.AssignmentUrl), assignment.ContentType));
                }
            }
            return(null);
        }