예제 #1
0
        public IHttpActionResult AddLog(LogDetails errorLog)
        {
            if (!ModelState.IsValid)
            {
                BadRequest("Model State is not valid");
            }

            var log = errorLogRepository.AddLog(errorLog);

            if (log == null)
            {
                ExpectationFailed("Unable to add log");
            }
            return(Ok(log));
        }