public HttpResponseMessage Post([FromBody] Student student)
        {
            registerStudentDetailsCommandHandler.Execute(student);
            string id = getStudentIdQuery.QueryAll();

            return(Request.CreateResponse(HttpStatusCode.Created, new { Message = "Student registration successful. Please note down student id generated is: " + id, Id = id, Name = student.FirstName + "-" + student.LastName }));
        }
Exemplo n.º 2
0
        public HttpResponseMessage Get()
        {
            var branches = getAllBranchesQuery.QueryAll();

            return(Request.CreateResponse(HttpStatusCode.OK, branches));
        }