예제 #1
0
 public IActionResult Inserir(IngredienteLancheModel ingredienteLanche)
 {
     try
     {
         return(new Util().verificaStatus(_IIngredienteLanche.Inserir(ingredienteLanche)));
     }
     catch (Exception ex)
     {
         return(BadRequest(new Error(HttpStatusCode.InternalServerError, "IngredienteLanche.Inserir()", ex.Message)));
     }
 }
예제 #2
0
 public string Inserir(IngredienteLancheModel ingredienteLanche)
 {
     try
     {
         DynamicParameters parameters = new DynamicParameters();
         parameters.Add("@IDLANCHE", ingredienteLanche.idLanche, DbType.Int32, ParameterDirection.Input);
         parameters.Add("@IDINGREDIENTE", ingredienteLanche.idIngrediente, DbType.Int32, ParameterDirection.Input);
         return(Executar("SP_INGREDIENTELANCHE_INSERIR", parameters, CommandType.StoredProcedure));
     }
     catch (Exception ex)
     {
         throw new Exception(ex.Message);
     }
     finally
     {
         Dispose();
     }
 }