コード例 #1
0
        public IHttpActionResult CreateSpeaker(SpeakerRepresentation representation)
        {
            var speaker = _speakerService.AddSpeaker(representation.userName);

            _unitOfWork.Commit();

            var created = CreateRepresentation(speaker);

            return(Created(
                       created._links["self"].href,
                       created));
        }
コード例 #2
0
 public void WhenAddSpeaker(string userName)
 {
     _speakerService.AddSpeaker(userName);
     _unitOfWork.Commit();
 }