The method or operation is not implemented error

3

When I add a record to my Include screen, this error appears to me.

What can it be?

Service

public void AddItem(Test item)
        {

            var codigos = this.context.Tests.SingleOrDefault(x => x.Codigo == item.Codigo);
            if (codigos != null)
            {
                this.context.Testes.Any(x =>
                x.Id == codigos.Id
                && x.Codigo != item.Codigo);
                throw new ValidationException("Codigo", Resources.TestesResources.ErroUniqueKeyCodigo);
            }
            else
            {
                base.context.Tests.Add(item);
                base.Save();

            }

        }

Controller

[HttpPost]
 public ActionResult Incluir([ModelBinder(typeof(CollectionModelBinder))]Testitem)
        {
            if (this.ModelState.IsValid)
            {
                item.Id = this.Id;
                item.Value = DateTime.Now;
                item.Use = User;
                try
                {                    
                    this.Service.AddItem(item);
                    return this.SuccessView(true);
                }
                catch (ValidationException exception)
                {
                    base.AddValidationErrors(exception);
                    return base.PartialView(item);
                }
            }
            else
                return base.PartialView(item);
        }

Error

    
asked by anonymous 21.08.2015 / 15:19

1 answer

1

Most likely you used code generators where you generate methods in the following format:

void MeuNovoMetodo () {
    throw new NotImplementedException ();
}

They do this so that your code can compile but you do not forget to implement it later. You will only find out which method you forgot to implement by looking at the stack trace, or by searching the files for the NotImplementedException exception.

    
21.08.2015 / 16:37