Beispiel #1
0
        public async Task <bool> InsertAsync(Historial_Registro model)
        {
            using (var connection = _connectionFactory.GetConnection)
            {
                var query = "uspHistorialRegistroInsert";

                var parameters = new DynamicParameters();
                parameters.Add("IDMicroempresa", model.IDMicroEmpresa);
                parameters.Add("Descripcion", model.Descripcion);
                parameters.Add("IDUsuario", model.IDUsuario);


                //Persistir la info en la bd
                var result = await connection.QuerySingleAsync <string>(query, param : parameters, commandType : System.Data.CommandType.StoredProcedure);

                return(result == "success" ? true : false);
            }
        }
Beispiel #2
0
 public async Task <bool> InsertAsync(Historial_Registro model)
 {
     return(await _Repository.InsertAsync(model));
 }