Beispiel #1
0
        public static RetrievalLinksModel MergeViewWithModelRetrievalLink(RetrievalLinksModel model, RetrievalLinksView view)
        {
            model.OldUrl = view.OldUrl;
            model.NewUrl = view.NewUrl;

            return(model);
        }
Beispiel #2
0
        public static RetrievalLinksView ConvertToViewRetrievalLink(RetrievalLinksModel result)
        {
            var retrievalLink = new RetrievalLinksView
            {
                NewUrl = result.NewUrl,
                OldUrl = result.OldUrl
            };

            return(retrievalLink);
        }
Beispiel #3
0
 public async Task <bool> UpdateRetrievalLink(RetrievalLinksModel retrievalLink)
 {
     _context.RetrievalLinks.Update(retrievalLink);
     return(await _context.SaveChangesAsync() > 0);
 }
Beispiel #4
0
        public async Task <bool> CreateRetrievalLink(RetrievalLinksModel retrievalLink)
        {
            await _context.RetrievalLinks.AddAsync(retrievalLink);

            return(await _context.SaveChangesAsync() > 0);
        }