Good I would like to ask you a question, how can I do to verify that the value written in a textbox is not repeated in the table of the database this would be a portion of the code that is in the presentation layer before being Sent to the method insert in the business logic.
public override bool EjecutarComandoNuevo()
{
if (!VerificarDatosObligatorios())
{
MessageBox.Show(@"Por favor ingrese los campos Obligatorios.", @"Atención", MessageBoxButtons.OK,
MessageBoxIcon.Error);
return false;
}
var nuevaProvincia = new ProvinciaDto
{
Descripcion = txtDescripcion.Text,
};
_provinciaServicio.Insertar(nuevaProvincia);
return true;
}