public ActionResult <object> Create([FromBody] Migrant migrant) { Helper helper = new Helper(); try { AdhaarIdFilter af = new AdhaarIdFilter(); _migrantService.UpdateMigrantData(out migrant, migrant, af.IsValidAadhaarNumber(migrant.AadharNumber)); return(_migrantService.Create(migrant)); } catch (Exception) { return(helper.CreateResponse(404)); } }
public ActionResult <Migrant> Create([FromBody] Migrant migrant) { _migrantService.Create(migrant); return(CreatedAtRoute("GetMigrant", new { id = migrant.Id.ToString() }, migrant)); }