1. I have enum
Code: Select all
public enum DepositType : int
{
/// <summary>
/// There are no comments for DepositType.Cash in the schema.
/// </summary>
[Description("TUNAI")]
Cash,
/// <summary>
/// There are no comments for DepositType.Credit in the schema.
/// </summary>
[Description("KREDIT")]
Credit,
/// <summary>
/// There are no comments for DepositType.Transfer in the schema.
/// </summary>
[Description("TRANSFER")]
Transfer,
/// <summary>
/// There are no comments for DepositType.TransferSaldo in the schema.
/// </summary>
[Description("CASH-SMS")]
TransferSaldo
}
3. I make private class data properties with string value that mapped by linqconnect to database
4. I make my own public properties with deposittype data type then I convert from string private properties that mapped by linqconnect, but no succes on linq query...always says can convert unmaped data
My point is I try to make string write and read from database but expose strongly type data type base on my enum to user...How I can achieve that, any hint? or trick? or workarround?
thanks for suggestion