I´m getting the next error message:
System.Data.Entity.Infrastructure.DbUpdateException: 'An error occurred while updating the entries. See the inner exception for details.'
Basically I have two classes, Type and Device.
public class Device
{
[Key]
public int DeviceID { get; set; }
public string Name { get; set; }
public virtual Type DeviceType { get; set;
}
and:
public class Type
{
[Key]
public string TypeName { get; set; }
}
How can I delete a Type in my programm without having problems with the databases?