Exemplo n.º 1
0
 public void Update(AuthorEntity authorEntity)
 {
     var savedEntity = FindById(authorEntity.Id);
     savedEntity.Id = authorEntity.Id;
     savedEntity.FirstName = authorEntity.FirstName;
     savedEntity.LastName = authorEntity.LastName;
     savedEntity.Email = authorEntity.Email;
 }
Exemplo n.º 2
0
 private AuthorEntity Clone(AuthorEntity authorEntity)
 {
     return new AuthorEntity
     {
         Id = authorEntity.Id,
         FirstName = authorEntity.FirstName,
         LastName = authorEntity.LastName,
         Email = authorEntity.Email
     };
 }
Exemplo n.º 3
0
 public void Delete(AuthorEntity authorEntity)
 {
     throw new NotImplementedException();
 }
Exemplo n.º 4
0
 public void Create(AuthorEntity authorEntity)
 {
     var newEntity = Clone(authorEntity);
     newEntity.Id = authorList.Count;
     authorList.Add(newEntity);
 }