For the life of me I can't find why TempHire works and my app which is similar does not.
This code is located in TempHireSampleDataProvider
private StaffingResource NewResource(string first, string middle, string last, string summary)
{
return new StaffingResource
{
Id = CreateGuid(_resId++),
FirstName = first,
MiddleName = middle,
LastName = last,
Summary = summary,
Created = SystemTime.Now,
CreatedUser = "SampleData",
Modified = SystemTime.Now,
ModifyUser = "SampleData"
};
}
But the class is defined this way
internal StaffingResource()
{
}
/// <summary>Gets or sets the Id. </summary>
[DataMember]
[DatabaseGenerated(DatabaseGeneratedOption.None)]
[Required]
public Guid Id { get; internal set; }
there suppose to be 2 errors in here, first the constructor is internal and second Id is should not be settable?
Now that must be me missing basic stuff.
Thanks anyway.