예제 #1
0
        // GET: Teacher
        public async Task <ActionResult> Index(string id)
        {
            OrleansHelper.EnsureOrleansClientInitialized();

            Guid teacherGuid = new Guid(id);

            ITeacher    grain       = GrainFactory.GetGrain <ITeacher>(teacherGuid);
            TeacherInfo teacherInfo = await grain.GetInfo();

            var teacher = new TeacherViewModel()
            {
                Id        = teacherGuid,
                FirstName = teacherInfo.FirstName,
                LastName  = teacherInfo.LastName
            };

            return(View(teacher));
        }