I have the following solution structure. This is a business domain (for an amount transfer operation in bank account) which will be called by a WCF service. Is the solution structuring correct?
Data Acess Layer does not create domain objects. It just pass database record wrapped in another simple object (DataEntities.AccountRow). Is it a good/standard approach?
Manager and domain objects are in two different layers. Is it okay?
A layer “DTOforServiceCommunication” is created for communicating with WCF service.
Is DTOforServiceCommunication and DataEntities are redundant or a good practice?
What are the improvement points for this solution structure?
Note: The service mentioned above will be used by multiple business functions (clients). Since the SOA is not object oriented, we cannot pass business domain objects across the boundary.

// TransferDTO
namespace DTOforServiceCommunication
{
public class TransferDTO
{
public int UserID { get; set; }
public int FromAccounutNumber { get; set; }
public int ToAccountNumber { get; set; }
public int AmountToTransfer { get; set; }
}
}
// AccountRow
namespace DataEntities
{
public class AccountRow
{
public int AccountNumber { get; set; }
public string AccountType { get; set; }
public int Duration { get; set; }
public int DepositedAmount { get; set; }
}
}
// AccountManager
namespace BusinessManager
{
public class AccountManager
{
public void TransferAmount(DTOforServiceCommunication.TransferDTO transferDTO)
{
//DAL does not create domain objects. It just pass database record wrapped in another simple object
DAL.AccountDAL accountDAL = new DAL.AccountDAL();
DataEntities.AccountRow row = accountDAL.GetAcocunt(transferDTO.UserID, transferDTO.FromAccounutNumber);
DomainObject.IBankAccount bankAccount = null;
if (String.Equals(row.AccountType, "Savings"))
{
bankAccount = new DomainObject.SavingsAccount();
bankAccount.UserID = transferDTO.UserID;
bankAccount.AccountNumber = row.AccountNumber;
bankAccount.AmountDeposited = row.DepositedAmount;
}
else
{
bankAccount = new DomainObject.FixedAccount();
bankAccount.UserID = transferDTO.UserID;
bankAccount.AccountNumber = row.AccountNumber;
bankAccount.AmountDeposited = row.DepositedAmount;
}
bankAccount.Transfer(transferDTO.ToAccountNumber, transferDTO.AmountToTransfer);
}
}
}
//DAL
namespace DAL
{
//DAL does not create domain objects. It just pass database record wrapped in another simple object
public class AccountDAL
{
List<DataEntities.AccountRow> dbRecords = new List<DataEntities.AccountRow>()
{
new DataEntities.AccountRow{AccountNumber=1,AccountType="Savings",Duration=6,DepositedAmount=50000},
new DataEntities.AccountRow{AccountNumber=2,AccountType="Fixed",Duration=6,DepositedAmount=50000}
};
public DataEntities.AccountRow GetAcocunt(int userID, int accountNumber)
{
return dbRecords[0];
}
}
}
READING: