parent
4104dbd5fa
commit
905cbef374
@ -0,0 +1,27 @@
|
||||
// using System;
|
||||
// using Entities;
|
||||
// using Models;
|
||||
|
||||
// namespace Model2Entities
|
||||
// {
|
||||
// public static class Extension<Tentity>
|
||||
// {
|
||||
// public static TEntity ToEntity(this Book model)
|
||||
// => new BookEntity
|
||||
// {
|
||||
// Id = model.Id,
|
||||
// Title = model.Title,
|
||||
// Author = model.Author,
|
||||
// Isbn = model.Isbn
|
||||
// };
|
||||
|
||||
// public static IEnumerable<TEntity> ToEntities(this IEnumerable<Book> models)
|
||||
// => models.Select(m => m.ToEntity());
|
||||
|
||||
// public static Book ToModel(this TEntity myBookEntity)
|
||||
// => new Book(myBookEntity.Id, myBookEntity.Title, myBookEntity.Author, myBookEntity.Isbn);
|
||||
|
||||
// public static IEnumerable<Book> ToModels(this IEnumerable<BookEntity> booksEntities)
|
||||
// => booksEntities.Select(e => e.ToModel());
|
||||
// }
|
||||
// }
|
Binary file not shown.
Loading…
Reference in new issue