예제 #1
0
        public async Task <SystemWebsiteModel> Validate(SystemWebsiteModel model)
        {
            if (string.IsNullOrEmpty(model.Url))
            {
                throw new WebsiteUrlIsRequiredException();
            }

            model.Type = await _systemLookupItemService.GetItem("Website Types", model.Type.Id);

            return(model);
        }
예제 #2
0
 //  Create entity from model.
 public SystemWebsite(SystemWebsiteModel model)
 {
     Type = new SystemLookupItemValue(model.Type);
     Url  = model.Url;
 }