Error calling method in code behind [closed]

-1
using System;
using Treinamento.DTO.Global;
using Treinamento.BLL;
namespace Treinamento.WEB.Tabelas.cidade
{
public partial class Listar : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        GridView1.DataSource = CidadeBLL.Instance.Listar();
        GridView1.DataBind();

        if (GridView1.Rows.Count == 0)
            LabelMensagem.Visible = true;
    }

    protected void GridView1_SelectedIndexChanged(object sender, EventArgs 
    e)
    {

    }
  }
}
  

Severity Code Description Project File Line Suppression State   Error CS1061 'object' does not contain a definition for 'List' and no extension method 'List' accepting a first argument of type 'object' could be found (are you missing a directive or an assembly reference?) Training.WEB C : \ Users \ danilo.costa \ Desktop \ TrainingNET \ source \ Training.WEB \ Tables \ city \ List.aspx.cs 10 Active

    
asked by anonymous 29.10.2018 / 13:20

1 answer

0

CidadeBLL.Instance does not have method Listar() or has not initialized correctly.

    
29.10.2018 / 13:28