Таблица SQL Server:
[img]https: //i.sstatic.net/f5GIIjz6.png[/img]
Класс данных:
Код: Выделить всё
[Table("EntryAttendee")]
public class EntryAttendee
{
#region Database Properties
[Key]
public int EntryAttendeeId { get; set; }
[Required]
public int PlayToWinEntryId { get; set; }
[Required]
public int EventAttendeeId { get; set; }
[Required]
public int LikelyToBuy { get; set; }
[Required]
public int GameRating { get; set; }
[Required]
public bool AlreadyOwns { get; set; }
[Required]
public bool WantToWin { get; set; }
[Required]
public DateTime LastUpdatedDate { get; set; }
[Required]
public int LastUpdatedBy { get; set; }
[Required]
public DateTime CreatedDate { get; set; }
[Required]
public int CreatedBy { get; set; }
[Required]
public bool Deleted { get; set; }
#endregion
#region Relational Objects
public virtual EventAttendee EventAttendee { get; set; }
#endregion
#region Constructors
public EntryAttendee()
{
this.AlreadyOwns = false;
this.WantToWin = true;
this.LastUpdatedDate = this.CreatedDate = DateTime.UtcNow;
this.Deleted = false;
}
#endregion
}
Не удалось выполнить DbCommand (6 мс) [Parameters=[], CommandType='Text', CommandTimeout='60']
SELECT [e].[EntryAttendeId], [e].[AlreadyOwns], [e].[AttendeId], [e].[ CreatedBy], [e].[CreatedDate], [e].[Deleted], [e].[EventAttendeeId], [e].[GameRating], [e].[LastUpdatedBy], [e].[LastUpdatedDate] , [e].[LikelyToBuy], [e].[PlayToWinEntryId], [e].[WantToWin]
FROM [EntryAttendee] КАК [e]
ГДЕ [e].[Deleted] CAST(1 бит AS)
Вы можете видеть, что он добавляет [e].[AttendeId] к запросу, и я не могу понять, почему . Я добавил аннотацию [Key] к EntryAttendeId, но это не помогло.
Подробнее здесь: https://stackoverflow.com/questions/791 ... stent-fiel
Мобильная версия