public Response <MentorshipVM> SetContactDetails([FromBody] ContactUpdate ContactUpdate)
        {
            var service = new Services.Relationships.MentorshipService(Context, CurrentUser);

            LogService.Write("Save Contact Details", String.Format("User:{0};Mentorship:{1}", ContactUpdate.UserId, ContactUpdate.MentorshipId));
            return(new Response <MentorshipVM>(service.SetContactDetails(ContactUpdate)));
        }
        public Response <MentorshipVM> CancelMentorship(Guid MentorshipId)
        {
            var service = new Services.Relationships.MentorshipService(Context, CurrentUser);

            LogService.Write("Cancel Mentorship", String.Format("User:{0};Mentorship:{1}", CurrentUser.UserId, MentorshipId));

            return(new Response <MentorshipVM>(service.CancelMentorship(MentorshipId)));
        }
        public Response <MentorshipVM> CloseMentorship([FromBody] Evaluation evaluation)
        {
            var service = new Services.Relationships.MentorshipService(Context, CurrentUser);

            LogService.Write("Close Mentorship", String.Format("User:{0};Mentorship:{1}", evaluation.UserId, evaluation.MentorshipId));

            return(new Response <MentorshipVM>(service.CloseMentorship(evaluation)));
        }
        public Response <Mentorship> Post([FromBody] Mentorship value)
        {
            var service = new Services.Relationships.MentorshipService(Context, CurrentUser);

            // service.SaveMentorship(value);

            return(new Response <Mentorship>(value));
        }
Example #5
0
        public Response <MentorshipVM> ClaimNextMentorship(Guid UserId, Guid TopicId)
        {
            var service = new Services.Relationships.MentorshipService(Context, CurrentUser);

            LogService.Write("Claim next mentorship", String.Format("User:{0};Topic:{1}", UserId.ToString(), TopicId.ToString()));

            return(new Response <MentorshipVM>(service.ClaimNextMentorship(UserId, TopicId)));
        }
Example #6
0
        public Response <bool> RegisterMentor(Guid UserId, Guid TopicId)
        {
            var service = new Services.Relationships.MentorshipService(Context, CurrentUser);

            service.RegisterMentor(UserId, TopicId);

            LogService.Write("Registered as Mentor", String.Format("User:{0};Topic:{1}", UserId.ToString(), TopicId.ToString()));

            return(new Response <bool>(true));
        }
        public Response <MentorshipVM> GetMentorship(Guid MentorshipId)
        {
            var service = new Services.Relationships.MentorshipService(Context, CurrentUser);

            return(new Response <MentorshipVM>(service.GetMentorship(MentorshipId)));
        }