Hi, I made some changes to this table in my database and now I'm having problems with my data model. Trying to get my data I got the following error. I understand that the error is in data model, now I must change it to be similar to my new table. From this I have come up with a series of questions regarding the data model. They are the following:
- Should my model contain the data equivalent that rows in my Sql table?
- Can I use less data in my model?
- What is the correct data type to reference a
varbinary
in my model?
Here I leave my previous data model and if you could recommend me some changes to make this work, it would be great. Thank you very much: D
using System.ComponentModel.DataAnnotations;
namespace PCotiza_compras.Models {
public class Requests {
public int Id {
get;
set;
}
public string Wiw {
get;
set;
}
[Display(Name = "Proyecto")]
public string Project {
get;
set;
}
[Display(Name = "Esquema")]
public int schemeid {
get;
set;
}
[Display(Name = "Fecha")]
public string Date {
get;
set;
}
[Display(Name = "Estado")]
public string status {
get;
set;
}
[Display(Name = "Días de expiración")]
public int ExpirationDays {
get;
set;
}
[Display(Name = "Comentarios")]
public string Comments {
get;
set;
}
[Display(Name = "Departamento")]
public int DepartmentId {
get;
set;
}
[Display(Name = "Categoría")]
public int CategoryId {
get;
set;
}
}
}