public AdvertModel GetById(int id) { var advertEntity = _repo.GetAdvert(id); if (advertEntity == null) { return(null); } return(Map(advertEntity)); }