public IActionResult Create([FromBody] Address model) { if (model == null || !ModelState.IsValid) { return(BadRequest()); } _repo.Add(model); return(CreatedAtAction("Create", model)); }
public virtual Address Add(Address address) { _logger.LogInformation($"Add Address"); return(address.Validate(true) ? _mapper.Map <Address>(_addressRepo.Add(_mapper.Map <Entity.Address>(address))) : null); }