0

After using DB first approach with EF my context.cs file has the follwing for a stored procedure:

public virtual ObjectResult<selectCases_Result> selectCases()
{
    return ((IObjectContextAdapter)this).ObjectContext.ExecuteFunction<selectCases_Result>("selectPurgeCaseFolio");
}

In a sepearte class file I'm trying to invoke it to get the result with the following:

public SelectCases()
{    
  var result = _context.selectCases;
}

However the error I get is on result:

"Cannot assign method group to an implicitly-typed local variable"

How can I get the result of this select query into a dataset or anyother type of object to see the results?

Nkosi
  • 235,767
  • 35
  • 427
  • 472
Angel Cloudwalker
  • 2,015
  • 5
  • 32
  • 54
  • 1
    Possible duplicate of [Cannot assign method group to an implicitly-typed local variable](http://stackoverflow.com/questions/19623299/cannot-assign-method-group-to-an-implicitly-typed-local-variable) – Gilad Green Aug 05 '16 at 15:34

1 Answers1

1

You forgot to call the method (with ())

var result = _context.selectCases(); 

You are trying to call it like a property when you should be calling it as a method

Nkosi
  • 235,767
  • 35
  • 427
  • 472