public data.Entities.Transfer MapToEntity() { var entity = new data.Entities.Transfer() { TransferId = this.TransferId, Description = this.Description, ToAccountId = this.ToAccount.AccountId, FromAccountId = this.FromAccount.AccountId, DateCreated = this.DateCreated, Amount = this.Amount }; return(entity); }
public static Transfer MapFromEntity(data.Entities.Transfer entity) { var transfer = new Transfer() { TransferId = entity.TransferId, Description = entity.Description, ToAccount = Account.MapFromObject(entity.TovAccount), FromAccount = Account.MapFromObject(entity.FromvAccount), DateCreated = entity.DateCreated, Amount = entity.Amount }; return(transfer); }