[ResponseType(typeof(Event))] public async Task<IHttpActionResult> PostEvent(Event @event) { if (!ModelState.IsValid) { return BadRequest(ModelState); } db.Events.Add(@event); await db.SaveChangesAsync(); return CreatedAtRoute("DefaultApi", new { id = @event.Id }, @event); }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)