Код: Выделить всё
var db = new hublisherEntities();
establishment_brands est = new establishment_brands();
est.brand_id = 1;
est.establishment_id = 1;
est.price = collection["price"];
est.size = collection["size"];
db.establishment_brands.Add(est);
db.SaveChanges();
< /code>
Это дает мне ошибку < /p>
значение не может быть нулевым. Имя параметра: источник < /p>
< /blockquote>
Stacktrace of < /p>
[Argirynullexception: значение не может быть нулевым. Имя параметра: источник]
system.linq.enumerable.any (ienumerable1 source, Func
+4083335 System.Data.Entity.Internal.InternalContext.WrapUpdateException(UpdateException
updateException) +87
System.Data.Entity.Internal.InternalContext.SaveChanges() +193
System.Data.Entity.Internal.lazyInternalContext.savechanges () +33
System.data.entity.dbcontext.savechanges () +20 ... ... < /p>
< /blockcontext>
Я просто хочу добавить к таблице. Орм ef.
Подробнее здесь: https://stackoverflow.com/questions/162 ... ame-source