public StatusModel Create(Offer offer) { var response = new StatusModel(); bool ifExists = _offersRepository.CheckIfExists(null, offer.Title); if (ifExists) { response.IsSuccessfull = false; response.Message = $"There already is an offer with title {offer.Title}"; } else { offer.DateCreated = DateTime.Now; //offer.Slug = offer.Title.GenerateSlug(); _offersRepository.Create(offer); } return(response); }