コード例 #1
0
ファイル: Transfer.cs プロジェクト: RyanLadley/DtsOps
        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);
        }
コード例 #2
0
ファイル: Transfer.cs プロジェクト: RyanLadley/DtsOps
        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);
        }