My model looks like this:
namespace Flow.Models
{
public abstract class Project
{
public int ID { get; set; }
public String HashID { get; set; }
public string FileLoc { get; set; } //Use HashedID above.
public bool Network { get; set; }
public int ClientID { get; set; }
public int FirmID { get; set; }
public ICollection<Order> Orders { get; set; }
}
}
AND
namespace Flow.Models
{
public class ProjectDepo : Project
{
public DateTime DepoDate { get; set; } //some way to set this to only the date
public TimeSpan DepoTime { get; set; } //some way to set this to only the time of day
public bool DepoNoticeReceived { get; set; } //yes or no
//public int FirmUserID { get; set; }
}
}
When I scaffold ProjectDepo, I receive these types of error messages:
CS1061 'CreateModel' does not contain a definition for 'DepoNoticeReceived' and no extension method 'DepoNoticeReceived' accepting a first argument of type 'CreateModel' could be found (are you missing a using directive or an assembly reference?)
AND
CS1061 'CreateModel' does not contain a definition for 'Network' and no extension method 'Network' accepting a first argument of type 'CreateModel' could be found (are you missing a using directive or an assembly reference?)
Only for the fields that I have set a 'public bool'.
In the database, both 'Network' and 'DepoNoticeReceived' are set as 'bit'. One is nullable and the other is not.
I do not know why the Scaffolding generates these errors.
Please pass along any ideas.
thank you for any assistance.
chuck