AutoClaimWebService.Controllers.MitchellClaimTypesController.PostMitchellClaimType C# (CSharp) Method

PostMitchellClaimType() private method

private PostMitchellClaimType ( MitchellClaimType mitchellClaimType ) : Task
mitchellClaimType MitchellClaimType
return Task
        public async Task<IHttpActionResult> PostMitchellClaimType(MitchellClaimType mitchellClaimType)
        {
            if (!ModelState.IsValid)
            {
                return BadRequest(ModelState);
            }

            db.Claims.Add(mitchellClaimType);
            await db.SaveChangesAsync();

            return CreatedAtRoute("DefaultApi", new { id = mitchellClaimType.MitchellClaimTypeId }, mitchellClaimType);
        }