I was using nvarchar
data type in sql (msql-server) to describe Description.
But I would like to change the column to an xml
data type instead.
In my c# datalayer I'm using petapoco to get the data, which is using Ado.Net DataReader.
so
poco object:
[PetaPoco.TableName("sqlTableName")]
[PetaPoco.PrimaryKey("ID")]
public class PlainObj
{
public int ID { get; set; } //(int, not null)
public string Description { get; set; } //(string, null) want to change this to xml type
}
poco Get method
public static List<PlainObj> Get(int InId)
{
var s = PetaPoco.Sql.Builder.Append(";EXEC @0", Common.StoreProcs.GetSP);
s.Append("@@ID = @0", new SqlParameter() { SqlDbType = SqlDbType.Int, Value = InId });
return PetaPocoContext.Fetch<PlainObj>(s); //Gets the object
}
My question is, how do I get XML instead of string for Description, and does PetaPoco supports it.