private int Add(string url) { var longUrl = new LongUrl { Url = url }; longUrl = longUrlRepository.Add(longUrl); longUrlRepository.Save(); return longUrl.Id; }
public void Initialize() { longUrl = new LongUrl {Id = 1, Url = "https://github.com/marciotoshio/MyPersonalShortner"}; validationContext = new ValidationContext(longUrl, null, null); }