public async Task <IHttpActionResult> AddAdmin([FromBody] Admin admin) { ValidationError[] validationErrors = await adminService.AddAdminAsync(admin, User.Identity.Name); if (validationErrors.Length == 0) { ApplicationMemoryCache.Instance.Remove("GetAllAdmins()"); return(Ok()); } return(BadRequest(validationErrors[0].Message)); }