public static User ConvertRowToUser(Row user) { return(new User { Id = new Guid(user.GetValue <string>("id")), FirstName = user.GetValue <string>("first_name"), LastName = user.GetValue <string>("last_name"), Gender = user.GetValue <GenderType>("gender"), ContactList = ContactAssembler.ConvertListContactEntityToListContact(user.GetValue <List <ContactEntity> >("contacts")) }); }
public static UserEntity ConvertUserToUserEntity(User user) { return(new UserEntity { Id = user.Id.ToString(), FirstName = user.FirstName, LastName = user.LastName, Gender = (GenderType)user.Gender, ContactList = ContactAssembler.ConvertListOfContactToListContactEntity(user.ContactList) }); }