示例#1
0
 public static GifEntryDb ConvertToDatabase(this GifEntry gifEntry)
 {
     if (gifEntry != null)
     {
         GifEntryDb gifEntryDb = new GifEntryDb()
         {
             Id       = gifEntry.Id,
             UserDbId = gifEntry.UserId,
             Url      = gifEntry.Url,
             Keyword  = gifEntry.Keyword
         };
         return(gifEntryDb);
     }
     else
     {
         return(new GifEntryDb());
     }
 }
示例#2
0
 public static GifEntry ConvertToDomain(this GifEntryDb gifEntryDb)
 {
     if (gifEntryDb != null)
     {
         GifEntry gifEntry = new GifEntry()
         {
             Id      = gifEntryDb.Id,
             UserId  = gifEntryDb.UserDbId,
             Url     = gifEntryDb.Url,
             Keyword = gifEntryDb.Keyword
         };
         return(gifEntry);
     }
     else
     {
         return(new GifEntry());
     }
 }