>Hi everybody,
>
>In my ClientRepository class I am trying to add this method
>
>
>public void UpdateClient(Client client, bool autoCommit = true)
> {
> this.context.Entry(client).State = EntityState.Modified;
> if (autoCommit) this.Commit();
> }
>
>However, I am getting EntityState underlined with red and saying name "EntityState" does not exist in this content. I have "using System.Data" declaration at the very top and I've checked that this enumeration exists in System.Data namespace.
>
>What I am doing wrong?
>
>Thanks in advance.
Ok, after I built the project, the error became apparent - it wanted System.Data.Entity in the references.
Now, I also have warnings in this line
<input type="number" id=@ViewData.ModelMetadata.PropertyName name=@ViewData.ModelMetadata.PropertyName class="numericOnly" value=@Model />
Warning 1 Validation (HTML5): This attribute requires a value. If the value is enclosed in quotation marks, the quotation marks must match.
Is there more elegant way to write the above to not have this warning?
If it's not broken, fix it until it is.
My Blog