linqtemplates

SubSonic 3 Linq projecting anonymous types but not class types

て烟熏妆下的殇ゞ 提交于 2019-12-01 01:54:58
I am fairly new to SubSonic 3/Linq, and don't know if I'm missing something obvious, but I think I ran into a projection issue. I am trying to perform the most basic query, and getting back proper results only when I use anonymous types. The moment I swap the anonymous types with regular class types, I get all properties set to null/zero. I am crafting a DAL class library, so unfortunately anonymous types are not an option. Snippet using System; using System.Linq; using Fruits.Data; namespace FruitTest { class Program { static void Main(string[] args) { var db = new FruitsDB(); var fruits =

SubSonic 3 Linq projecting anonymous types but not class types

自作多情 提交于 2019-11-30 21:21:07
问题 I am fairly new to SubSonic 3/Linq, and don't know if I'm missing something obvious, but I think I ran into a projection issue. I am trying to perform the most basic query, and getting back proper results only when I use anonymous types. The moment I swap the anonymous types with regular class types, I get all properties set to null/zero. I am crafting a DAL class library, so unfortunately anonymous types are not an option. Snippet using System; using System.Linq; using Fruits.Data; namespace