[AllowAnonymous] //to allow annonymous post public ActionResult <ItemResponse <int> > Insert(ContactUsAddRequest model) { ActionResult result = null; try { _emailService.ContactUsEmail(model); int id = _contactUs.Insert(model); ItemResponse <int> response = new ItemResponse <int>(); response.Item = id; result = Created201(response); } catch (Exception ex) { Logger.LogError(ex.ToString()); result = StatusCode(500, new ErrorResponse(ex.Message)); } return(result); }