Beispiel #1
0
 public QnAVideoViewModel(QnAVideo q)
 {
     Id       = q.Id;
     QAId     = q.QAId;
     Title    = q.Title;
     EmbedKey = q.EmbedKey;
     EmbedURL = q.EmbedURL;
     IsActive = q.IsActive;
 }
 public async Task <int> Create(QnAVideoViewModel model)
 {
     try {
         QnAVideo qnAVideo = new QnAVideo()
         {
             EmbedURL = model.EmbedURL,
             EmbedKey = model.EmbedKey,
             IsActive = true,
             QAId     = model.QAId,
             Title    = model.Title
         };
         return((await _IQnAVideoRepository.AddAsync(qnAVideo)).Id);
     }
     catch (Exception ex) {
         return(0);
     }
 }