public async Task <IActionResult> Create([FromBody] ParticipantInputModel model) { if (!ModelState.IsValid) { return(BadRequest(ModelState)); } var item = new Participant { Name = model.Name, Email = model.Email }; _context.Add(item); await _context.SaveChangesAsync(); return(Ok( new ParticipantOutputModel { Name = item.Name, Email = model.Email, Id = item.Id, } )); }
public ParticipantModel GetParticipant(ParticipantInputModel participantInputModel) { return(Post <ParticipantModel, ParticipantInputModel>("mod_assign_get_participant", participantInputModel)); }