I used the data type nvarcharin sql (msql-server) to describe the description. But instead, I would like to change the column to a data type xml. In my C # datalayer, I use petapoco to get data using Ado.Net DataReader.
So
poco object:
[PetaPoco.TableName("sqlTableName")]
[PetaPoco.PrimaryKey("ID")]
public class PlainObj
{
public int ID { get; set; }
public string Description { get; set; }
}
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);
}
My question is how do I get XML instead of a description string, and supports PetaPoco.
source
share