public static FriendshipApiModel From(Friendship friendship) { return(new FriendshipApiModel { FromId = friendship.FromId, ToId = friendship.ToId, To = UserProfileApiModel.From(friendship.To), }); }
public static UserProfile To(this UserProfileApiModel model) { return(new UserProfile { Id = model.Id, BirthDate = model.BirthDate, FirstName = model.FirstName, LastName = model.LastName, Sex = model.Sex }); }