1. Update EF and can't find the specified table?
The table does not have a primary key set!
2. Have I added an item with the same key?
Reason 1: Check if there are duplicate primary keys!
Reason 2: Check whether the assignment field is duplicated!
Reason 3: The name of the reference foreign key cannot be the same as the table field!
3. Is the rebuild solution successful, but the release fails?
Reason 1: Check whether the .NET Framework version is consistent!
Reason 2: Check if the reference (log4net) is correct!
4. POCO T4 template, failed to generate? (Type or lifespace name not found)
Check if the symbol is wrong (semicolon), it really can't be re-referenced!
5. Cannot update EntitySet "xxx table" because it has a DefiningQuery, and there is no element in the element that supports the current operation?
EF entities do not have a primary key, just delete the rereference!
6. The attribute "state" is part of the key information of the object, cannot be modified?
No primary key, or duplicate primary key!
7. Error when updating entries. For more information, see Internal Exceptions?
The table in the database does not have an identification column, or the data type is wrong!
8. There is no ViewData of type "IEnumerable" with the key "categoryid"<SelectListItem>?
This sentence means: type ViewData does not exist, and its type is IEnumerable<SelectListItem>, and its primary key is categoryid. IEnumerable <SelectListItem>means a collection of SelectListItem.
The solution is: change return View() to return Create()!
9. Verification of one or more entities fails. For more information, see the "EntityValidationErrors" property?
The cause of the problem could be:
1. Non-empty columns do not insert values incorrectly
2. The length of the foreign key column between multiple tables is different
3. The ef context object db is empty
4. EF context setting property to db. Configuration.ValidateOnSaveEnabled = false;
5. The content length exceeds the maximum column length
6. The library was added to the solution but not updated
7. Add a reference using System.Data.Validation;
10. The entity type xxx (table) is not part of the model in the current context? / Entity class does not match database field type or attribute?
This table is not in the current database, you need to add a line of code to convert it to another database:
oc.iBllSession.Itb_biaoming_BLL. DbName = "Database Name";
11. Failed to find the type or namespace name"... "(Is there a lack of using instructions or procedures)?"
Delete the original quote, re-quote! |