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()); } }
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()); } }