Posts by pnet • 14,727 points
909 posts
-
-2
votes1
answer42
viewsQ: Delete api not working, do not delete. Stored Procedure in the database is working
This is the API public class DeleteCidade { BancoContext banco = new BancoContext(); public void deleteCidade(int id) { banco.Database.SqlQuery<Cidade>("exec sp_del_cidade", new…
-
-4
votes1
answer82
viewsQ: Map Api port to MVC project
I created an MVC project and an API. I need to get the API when I upload the project to (F5). Example, I created a service that is a GET in my Type table. How I can map the API to get inside a MVC…
-
-3
votes2
answers596
viewsQ: How to use a dynamic url in angular projects 6
I now need to send my project, created in Angular 6, to Homolog. I have a file called app.constants and inside a class called Configuration. In this class I "failed" the API url for my tests, like:…
-
0
votes2
answers860
viewsA: error: Uncaught (in Promise): Error: Value must be an array in Multiple-Selection mode
I decided and did not understand until now why it did not work as it is. With the help of a colleague, I did it in my Form on the Angular (Component) side. It was a solution, with face of Ambi, but…
-
1
votes2
answers860
viewsQ: error: Uncaught (in Promise): Error: Value must be an array in Multiple-Selection mode
Giving a compareWith, for the purpose of when I edit, the dropdowns can already be filled with the assigned values. By doing this, I catch this mistake: Uncaught (in Promise): Error: Value must be…
-
0
votes1
answer464
viewsQ: When loading list, mat-select should be already filled
This is my html <div class="container"> <div class="row"> <div class="col-md-12"> <table class="table table-striped table-bordered"> <caption> Lista de Aplicabilidades…
-
1
votes3
answers1188
viewsQ: Align button at the end of table
I have this table <div class="container"> <div class="row"> <div class="col-md-12"> <table class="table table-striped table-bordered"> <caption>Lista de Tipo de…
-
2
votes1
answer4397
viewsQ: Form validation with angular 6
I have this form, very simple, with just a field and a button. I gave a required input, and when I write with the empty and/or null field, it does not write(correct), but already switches to the…
-
1
votes1
answer343
viewsQ: Calling route from a button is not working
I need, when I create an Operator, after creating, I should call another screen, the list of operators. It turns out that it is not working. The route is called Operator and how I put on that…
-
0
votes1
answer93
viewsA: When recording caught a bad request using angular 6
I solved with the code below My current Komponent export class CreateApplicabilityComponent implements OnInit { createForm: FormGroup; private _createAplicabilty: Model.ApplicabilityModel; private…
-
-2
votes1
answer93
viewsQ: When recording caught a bad request using angular 6
When I try to record in the bank, I get error (400) bad request, when I insert by Postman two fields of the type of an object returns an empty array([]). I’m sure the sending of the data is wrong,…
-
-8
votes3
answers16511
viewsQ: Validate only number in input
I have this html <input formControlName="sGPTypeDeliveryId" type="text" placeholder="Tipo de Entrega" class="form-control" required="required" pattern="[0-9]+$"> using the Pattern attribute…
-
1
votes0
answers20
viewsQ: Update(Put) on my project does not write to BD(Mongodb)
I need to make an editing screen and I’m not getting it. See how my Component is doing(I’ve eliminated Imports to save space) @Component({ selector: 'app-operators', templateUrl:…
-
0
votes1
answer643
viewsA: Call delete at angle 6
So I decided, with this Component: @Component({ selector: 'app-operators', templateUrl: './operators.component.html', styleUrls: ['./operators.component.css'], providers: [OperatorService] }) export…
-
1
votes1
answer643
viewsQ: Call delete at angle 6
I have this HTML <div class="container-fluid"> <div class="row"> <div class="col-md-12"> <table class="table table-striped table-bordered table-hover"> <caption>Lista…
-
2
votes0
answers96
viewsQ: Image does not appear in the table
Use Angular 6 and bootstrap. I have a table and did this to display an image: ........ <tbody> <tr *ngFor="let operator of dataSource"> <td>{{ operator.operatorId }}</td>…
-
0
votes1
answer352
viewsQ: Error in mat-select when trying to choose an item
Error: ngModel cannot be used to Register form Controls with a Parent formGroup Directive. Try using formGroup’s Partner Directive "formControlName" Instead. Example: My HTML <div…
-
1
votes1
answer693
viewsQ: I can’t load data into an angular mat-select 6
This is my html <div class="container"> <form [formGroup]="createForm" (ngSubmit)="onPostCreateTypeFields()" style="width:400px; margin: 0 auto;"> <h1>Fields</h1> <div…
-
0
votes1
answer1137
viewsQ: Edit table at Angular 6
I have had some problems, because I don’t know Angular 6 well. I have this table: <div class="container-fluid"> <div class="row"> <div class="col-md-12"> <table class="table…
-
1
votes1
answer279
views -
0
votes1
answer103
viewsQ: When I give a post in the form I get this error: Typeerror: _co.postCreateTypeFields is not a Function
This is my html: <div class="container"> <form [formGroup]="form" (ngSubmit)="postCreateTypeFields()" style="width:400px; margin: 0 auto;"> <h1>Types Fields</h1> <div…
-
1
votes2
answers71
viewsQ: How to write to mongodb via API
I have this API(Controller) [Produces("application/json")] [Route("api/[controller]")] public class TypesFieldsController : Controller { private IAddTypeFieldService addTypeFieldService; public…
-
1
votes0
answers438
viewsQ: How to change the angular version within an Asp.net core project
I have an Asp.Net Core 2.0 project. Well, I now need to build some screens to make one CRUD using Angular. One should use the Angular 6, here at the company. Well, when I added in this Solution the…
-
1
votes1
answer1025
viewsQ: Position right bottom button with angled and boostrap
Use Stripped bootstrap table with Angular 6. That’s the screen: See that there’s a button plus in the upper left corner and it should be under the table, right side. This is my html <nav…
-
0
votes1
answer112
viewsQ: Starta button on the side and not under the mat-table
I have this html <link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet"> <div> <table mat-table [dataSource] = "dataSource"…
-
0
votes1
answer282
viewsA: I can’t get my mat-table popular
I solved it. The API was spitting out the json wrong. There was, if you look, one Array inside another. The Colleague who made the API has already corrected and now is ok.
-
-3
votes1
answer282
viewsQ: I can’t get my mat-table popular
This is my html with the mat-table <div> <table mat-table [dataSource] = "dataSource" class="mat-elevation-z8"> <ng-container matColumnDef="codigo"> <th mat-header-cell…
-
1
votes1
answer2161
viewsQ: Type an array of type any[] at angular 6
I need to type an object, not to receive any[] in agular 6. Well, no get, I get this from the API: { "error": false, "itens": [ [ { "operatorId": "819ee9cc-70b6-44dc-b9e8-afff8705142c", "name":…
-
0
votes0
answers84
views -
0
votes2
answers146
viewsQ: How to catch the return of a service within a @Component with angular 6
I made this table(omit the TR and TD’s). <table mat-table [dataSource] = "dataSource" class="mat-elevation-z8"> If I create a failed array, it works. Below my component(commented lines, work,…
-
1
votes1
answer364
viewsA: Table mat-table does not render in browser with Angular 6
I decided as follows: my html <div> <table mat-table [dataSource] = "operators"> <ng-container matColumnDef="Codigo"> <th mat-header-cell *matHeaderCellDef> Codigo…
-
2
votes1
answer364
viewsQ: Table mat-table does not render in browser with Angular 6
In the browser debug caught this error(screenshot): This is my page html (test) <div> <label>Nome: <input [(ngModel)]="operator.Name" placeholder="Nome"> </label>…
-
0
votes1
answer89
viewsQ: Error while trying to load a mat-table with angular 6
Starting with Angular 6. When trying to create a table, based on an example I picked up, I started having the following problem. I added in my module main, these lines: import { MatInputModule,…
-
0
votes2
answers112
viewsQ: How to add a built-in view to an Asp.net core 2.0 controller
I created a view (Razor Page) in an Asp.Net Core 2.0 project. How I build it from scratch and I now need to assign a controller to it. How do I do it?
-
0
votes0
answers46
viewsQ: Error while trying to create a view from a controller and model
When trying to create a View from the Controller, using Asp.Net Core 2.0 Web Api, I have this error. It only happens when I do: 1) Template -> List 2) Model class -> when I search the Model…
-
3
votes1
answer65
viewsQ: Doubt in a lambda expression returning "true"
When I do that: List<Tipo1> tipo = await context.MeuMetodo.Find(x => true).ToListAsync(); What am I saying here: (x => true)?
-
1
votes0
answers44
viewsQ: Consume an asmx service from a Rest
How do I pass an object I have in a REST for a ASMX? I have this controller in REST that has the object(client) that I want to send to a ASMX [Route("api/[controller]")] public class…
-
0
votes1
answer1250
viewsQ: Consume SOAP from a Rest in Asp.Net Core 2.0
I re-asked the question, trying to improve it for better understanding. 1) I created a WCF service, called Optoutservice.svc. In this service I have an interface and a class that implements this…
-
0
votes1
answer63
viewsQ: When injecting a controller dependency, Postman returns error
By doing it in mine Controller: [Route("api/[controller]")] public class OptOutClientController : Controller { IOptOutService _service; //Se comentar o construtor dá certo public…
-
0
votes1
answer850
viewsA: Pick up json from Postman and play on an object
Solved: My json was wrong, it missed a comma after the email. I just thought it was strange that Postman didn’t scream, it went smoothly. I thought about everything but Postman, because he spun and…
-
-1
votes1
answer850
viewsQ: Pick up json from Postman and play on an object
Have POST and use the Postman to test. Mount the url and body in Postman. Now, when I test on my object on mine Controller comes NULL, and of course it’s because I didn’t do it correctly. What do I…
-
0
votes1
answer777
viewsQ: Post method is not running on Postman
Creating a method POST and testing by Postman, I can’t access the Controller that POST. I haven’t implemented much yet, but I should stop at Break if, of course, it was working. Controller…
-
0
votes2
answers231
viewsA: Routing problems using Asp.net core
I did. At Startup I did: public void ConfigureServices(IServiceCollection services) { services.AddMvc(); services.AddRouting(); } public void Configure(IApplicationBuilder app, IHostingEnvironment…
-
-2
votes2
answers231
viewsQ: Routing problems using Asp.net core
When trying to route a core 2.0 application, I can’t get to the controller. public class GetClientController : Controller { LoadClient loadClient = new LoadClient(); [HttpGet] public…
-
0
votes1
answer249
viewsQ: Error while trying to create a Controller or Apicontroller
I created an empty Asp.Net Core 2.0 project (no scaffold). DDD model and etc. However when I try to create my controller, whether inherited from Apicontroller or Controller, it gives error:…
-
1
votes1
answer320
viewsQ: Post by Postman is giving error of Object Reference not set to an instance of an Object
I understand that the Frombody is coming null and I don’t know why. That’s my Postman payload { "ChannelCode" : "TS", "Name" : "Teste", "Celphone" : "(11)999999999", "Endpoint" : "www.teste.com.br",…
-
0
votes1
answer26
viewsQ: Mongodb Insert Error
I did that: MongoDB Enterprise>db.Channels.insert({ ... "ChannelCode" : "BT" ... "Name" : "Bartira" ... "Celphone" : "(11)971418418" ... "Endpoint" : "www.bartira.com.br" ... "TokenLogin" :…
-
1
votes1
answer63
viewsQ: Crud with Mongodb and C# error in type or namespace
Accompanying a Macoratti tutorial here, errors appear in three types. I don’t know what to add to solve. I Copy and Paste and gave error. Below the code: using MongoDB.Driver; using System; using…
-
-6
votes1
answer98
viewsQ: Automatically add items from an array
I have those values: x = 5; long[] b = new long[]{5,1,2,3}; I need to make a program that adds the array items b so that the result is always 5(x). You can repeat items, like: [1,1,1,1,1] or [5] or…
-
0
votes1
answer330
viewsQ: Web chart with c#
Does anyone know of an open source tool for graphing with c#(MVC)? It will be inline graphs and bars.