Beispiel #1
0
 public MyCrewViewModel(UserDTO user, CrewDTO crew, List<CrewGameSuggestionDTO> crewSuggestions, List<CrewApplicationDTO> applications)
 {
     User = user;
     Crew = crew;
     CrewSuggestions = crewSuggestions;
     Applications = applications;
 }
 public IHttpActionResult PostCrew(CrewDTO crew)
 {
     if (!ModelState.IsValid)
     {
         return BadRequest(ModelState);
     }
     facade.GetCrewRepository().Add(converter.Reverse(crew));
     return CreatedAtRoute("DefaultApi", new { id = crew.Id }, crew);
 }
        public IHttpActionResult PutCrew(int id, CrewDTO crew)
        {
            if (!ModelState.IsValid)
            {
                return BadRequest(ModelState);
            }

            if (id != crew.Id)
            {
                return BadRequest();
            }
            facade.GetCrewRepository().Update(converter.Reverse(crew));

            return StatusCode(HttpStatusCode.NoContent);
        }
 public CrewBuyConfirmationVM(UserDTO user, PlatformGameDTO platformGame, CrewDTO crew)
 {
     User = user;
     PlatformGame = platformGame;
     Crew = crew;
 }