基本上,我在EF数据库中得到了一个具有以下属性的表:
public int Id { get; set; }
public string Title { get; set; }
public string Description { get; set; }
public string Image { get; set; }
public string WatchUrl { get; set; }
public int Year { get; set; }
public string Source { get; set; }
public int Duration { get; set; }
public int Rating { get; set; }
public virtual ICollection<Category> Categories { get; set; }
它工作正常,但是当我将评级的int更改为double时,在更新数据库时会出现以下错误:
The object 'DF_Movies_Rating__48CFD27E' is dependent on column 'Rating'. ALTER TABLE ALTER COLUMN Rating failed because one or more objects access this column.
有什么问题吗?