1
What do I do to fix this error? It turns red underneath the methods created in this code.
And when I pass the mouse shows:
Inconsistent Accessibility: "Teacher" parameter type is less accessible than "Professor.Insert(Teacher)"
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace Escola.clsDados.BLL
{
public class Professor
{
DAL.Professor dalProf = new DAL.Professor();
public void Insert(Model.Professor oProf)
{
if (oProf.Nome == "")
{
throw new Exception("O campo nome é obrigatório");
}
dalProf.Insert(oProf);
}
public void Update(Model.Professor oProf)
{
if (oProf.Nome != "")
dalProf.Update(oProf);
}
public void Delete(Model.Professor oProf)
{
if (oProf.Codigo > 0)
dalProf.Delete(oProf);
}
}
}
Did the answer solve your question? Do you think you can accept it? See [tour] if you don’t know how you do it. This would help a lot to indicate that the solution was useful for you. You can also vote on any question or answer you find useful on the entire site (when you have 15 points).
– Maniero