示例#1
0
        public IActionResult Put(int id, CompanyInformation sample)
        {
            if (!ModelState.IsValid)
            {
                return(BadRequest(ModelState));
            }

            if (id != sample.Id)
            {
                return(BadRequest());
            }

            try
            {
                _companyInformation.Update(sample);
            }
            catch (Exception)
            {
                //AddLog(exception);
                return(NotFound("No Record Found against this Id..."));
            }

            return(Ok("Record Updated..."));
        }
示例#2
0
        public async Task <IActionResult> UpdateFromThirdParty()
        {
            await _companyInformation.Update(_dbContext);

            return(NoContent());
        }