小编mcb*_*wes的帖子

RavenDB使用集合偏移量中的值查询日期时间

我试图在Datetime上查询RavenDB,该日期时间被集合中的条目所抵消.如下所示,我有一个AppointmentReminder对象,其中包含许多AppointmentReminderJobs.我想查询AppointmentReminderJob将要运行的AppointmentReminders.

我的模型如下:

public class AppointmentReminder
{
    public int Id { get; set; }
    public string FirstName { get; set; }
    public string LastName { get; set; }
    public string Email { get; set; }
    public string Phone { get; set; }
    public DateTime AppointmentDateTime { get; set; }
    public ReminderStatus ReminderStatus { get; set; }
    public List<AppointmentReminderJob> AppointmentReminderJobs { get; set; }
 }

public class AppointmentReminderJob
{
    public JobStatus JobStatus { get; set; }
    public int DaysPrior { get; set; …
Run Code Online (Sandbox Code Playgroud)

datetime ravendb

6
推荐指数
1
解决办法
413
查看次数

带有 Linq OrderBy 子属性错误的 Automapper 投影

我在使用 AutoMapper(版本 5.1.1)投影结合 Linq OrderBy Child 属性表达式时遇到问题。我正在使用 Entity Framework Core(版本 1.0.0)。我收到以下错误:

“必须是可还原节点”

我的 DTO 对象如下

public class OrganizationViewModel
    {
        public virtual int Id { get; set; }
        [Display(Name = "Organization Name")]
        public virtual string Name { get; set; }
        public virtual bool Active { get; set; }
        public virtual int OrganizationGroupId { get; set; }
        public virtual string OrganizationGroupName { get; set; }
        public virtual int StrategyId { get; set; }
        public virtual string StrategyName { get; set; }
        public …
Run Code Online (Sandbox Code Playgroud)

projection automapper linq-to-sql entity-framework-core

1
推荐指数
1
解决办法
1127
查看次数