如何通过查询转换为流畅的组

时间:2011-11-15 05:18:23

标签: c# nhibernate fluent-nhibernate

这里是我的nhibernate投影和groupby查询

 criteria.SetProjection(Projections.ProjectionList().Add(Projections.Property("LastUpdatedUserName"), "LastUpdatedUserName")
            .Add(Projections.Property("Created"), "Created")
            .Add(Projections.Count("NIK"), "enrollmentcount")
            .Add(Projections.GroupProperty("LastUpdatedUserName"))
            .Add(Projections.GroupProperty("Created")))
            .SetResultTransformer(NHibernate.Transform.Transformers.AliasToBean(typeof(Demographic)));

此处创建的字段名称是oracle中的时间戳,现在我如何将其分组到groupproperty(to_char(created,'dd/mm/yyyy'))

任何指导对我都非常有帮助

0 个答案:

没有答案