Exemplo n.º 1
0
 public URLRedirectViewModel GetURLRedirectViewModel(URLDomainModel domainModel)
 {
     return(new()
     {
         Url = domainModel.LongUrl
     });
 }
Exemplo n.º 2
0
        public void AddURL(URLDomainModel url)
        {
            if (url is null)
            {
                throw new ArgumentNullException(nameof(url));
            }

            AddURLCommandParam param = new()
            {
                URLToAdd = url,
            };

            AddCommand.Execute(param);
        }
Exemplo n.º 3
0
 public UrlMongoModel(URLDomainModel domainModel)
 {
     ShortUrl       = domainModel.ShortUrl;
     LongUrl        = domainModel.LongUrl;
     ExpireDateTime = domainModel.ExpireDateTime;
 }