Posts by Rodrigo K.B • 637 points
40 posts
-
0
votes1
answer55
viewsQ: What is $$hasKey in the array items?
I realized that for some reason, a property called $$hasKey was added to my array items. Each item has this property with different values. Example: [0: {$$hasKey: 'Object1', uf: 'ES'}, 1:…
-
0
votes1
answer132
viewsA: Error in creating SQL Server table with Entity Framework
You should use Codefrist, and you should do Migration, right? if you create Migrations, delete the migration files, and have one created again. If it doesn’t work, in your database you have a table…
c#answered Rodrigo K.B 637 -
1
votes1
answer385
viewsA: Save Register in Bank with Entity
First we will make some changes to your Model, to make your life easier, we will use the conventions of Code First. namespace DAL.MODEL{ public class Cliente { public Cliente() {…
-
1
votes4
answers96
viewsA: What is the best solution ? Getbyid with a non-existent id in the BD
A solution option can also be this: public VendedorModel GetById(int CPF) { using (var db = new PowerVendasEntities()) { var registro = db.Vendedor .Where(x => x.VendedorCPF == CPF)…
-
1
votes1
answer608
viewsA: Adding values to a deserialized JSON object attribute in Javascript
What is happening is that the value in the Jason object, is as string, so when trying to execute the sum, is actually concatenating. In order to be able to do the mathematical calculation, there…
-
0
votes1
answer89
viewsA: How can I loop to insert data into a table in my form and then send it to my database?
Allan, basically what you need is to work with a javascript object. I’ll call this object an activity. Model class function atividade() { this.curso: undefined, this.segmento: undefined,…
-
0
votes2
answers159
viewsA: How to use the Where clause with Inno?
Basically it would look like this: public IQueryable<Pessoa> GetJoinAll() { var pessoas = Db.Pessoa .Include("PessoaEntidade") .Include("Filial") .Where(p => p.PessoaEntidade.PessoaTipo ==…
-
1
votes5
answers680
viewsA: What to do when a UI element cannot be used by a user?
In my view, it depends a lot on the scenario and the context in which the element lies. The option to display a message informing the user that he does not have permission I am not in favor, because…
uxanswered Rodrigo K.B 637 -
4
votes1
answer219
viewsA: Query Return - Generic Entity Framework Repository
Basically your problem is that when you use the skip and take after the toList(), the EF has gone to the comic book, brought all these records, and the skip and take are happening in memory. I…
-
2
votes1
answer384
viewsA: Photo conversion to Base64 with 414 error (Request-URI Too Long)
Basically your problem is that you are passing Base64 in the url, this cannot, because the url has a maximum size. That’s why you get the error mentioned in your question. To solve your problem the…
-
2
votes1
answer845
viewsA: Empty object array
Basically the problem is that an http request is asynchronous, so the browser will go through the whole block of its javascript function, then go to the server. Because of that the block below does…
javascriptanswered Rodrigo K.B 637 -
1
votes0
answers41
viewsQ: When should I use Let or var in javascript
I have observed in some javascript applications, the use of letin place of varwhen declaring a variable. So I’m having the following questions: What’s the difference between letand var At what point…
javascriptasked Rodrigo K.B 637 -
1
votes2
answers307
viewsQ: How to make the angular recognize an ng-keyup event created dynamically in the element
I’m creating a directive that should dynamically include a function in the angular event ng-keyup, I tried to do it this way: Directive angular.module('app').directive('validar',validar);…
-
1
votes1
answer165
viewsQ: How to use Include for objects that are inside a list
I have the following objects in my EF6 context. public class Produto { public Guid Id {get;set;} public string Nome {get;set;} } public class VedaItem { public int Item {get;set;} public float Valor…
-
0
votes1
answer223
viewsA: How to create a directive in Angularjs that creates a mask and did not modify the ng-model?
So your problem is that you’re using the setViewValue. ctrl.$setViewValue(_formatContaBanco(scope.model)); This causes ngModel to be updated as well, to have the viewValue and modelValue different…
-
3
votes1
answer144
viewsQ: Encrypting a string with SHA1 does not return the expected value
I’m consuming a webservice of nfse (electronic service invoice), and the nfse batch receipt function, there is that the password is encrypted using the algorithm SHA1. The Handbook exemplifies this:…
c#asked Rodrigo K.B 637 -
0
votes1
answer106
viewsA: Real Time in Javascript
This is possible Gracas Sockets TCP. A connection http normal creates a single communication route with the server. In other words, the client has to be making requests to the server to receive its…
-
0
votes1
answer46
viewsA: Error javascript: In Strict mode code, functions can only be declared at top level or immediately Within Another Function
Following Vitor’s suggestion in the comment my question, I was able to identify and solve the problem, I decided to write this answer to help someone who might have the same problem. The Problem In…
-
10
votes4
answers12404
viewsQ: How to compare if two javascript objects are equal?
We know that if I have two objects created in different variables, but with the same content, when comparing, javascript will return false. Example var objA = {a:'teste'} var objB = {a:'teste'} if…
javascriptasked Rodrigo K.B 637 -
0
votes1
answer46
viewsQ: Error javascript: In Strict mode code, functions can only be declared at top level or immediately Within Another Function
While testing my application on an android 4.4, appears this error, however on android 5 the error does not appear. Can anyone tell me what it might be.
-
0
votes2
answers132
viewsQ: How to change EF6 to create Datetime fields as datetime2
I am working with **EF6 Code-first", SQL-Server database. I came across the following error, when saving an object with Datetime property. The Conversion of a datetime2 data type to a datetime data…
-
0
votes1
answer303
viewsQ: datetime vs dateime2, which is the best?
I’m implementing a new project, using EF6 Codefirst, EF6 creates my database Sql-Server, with date columns as type datetime. What would be the difference between datetime and datetime2, and which is…
-
0
votes1
answer1268
viewsQ: Numeric keyboard input type="Text", Ionic Cordova
I have in my app a field for Cpf, I need to make sure that when the user fills Cpf, the device shows only the numeric keyboard. But if I change the <input type="text"> for <input…
-
0
votes1
answer40
viewsA: Cordova API Offline
What you’re looking for is plugin apache-Cordova for localStorage. With localStorage you now have a local database in your app, this way you can upload this data of which you mentioned, in this…
-
2
votes1
answer40
viewsA: How to take data from two inputs without using form?
Just capture the keydown event from $document of Angularjs, and call the function you want to be executed. I demonstrate how to do this with the code below. both the function and the eventListener…
angularjsanswered Rodrigo K.B 637 -
1
votes1
answer154
viewsA: Problem changing entity with E.F and Dapper
Your problem is that the Dapper query is outside the EF context, so you cannot modify the entity. The error occurred because when trying to set the state of the entity as Modiffied, in the EF…
-
2
votes1
answer552
viewsA: Store digital certificate on Server
I think the best solution is to store in database, saving the base64 certificate in a string. So you can encrypt the certificate and password. I work this way in my projects with digital…
-
2
votes1
answer219
viewsA: Repeatless attribute (Unique) with Entity Framework?
Whereas you are using Entity Framework 6`, you would have two options. "Fluent Api", which would be the example of your question. That is, yes you can and at my view should create a Unique Key, as…
entity-frameworkanswered Rodrigo K.B 637 -
6
votes2
answers905
viewsQ: How to create a sequential number that does not repeat, per user
Work on a bill issuance project, in this project exists the entity Emissor. My database Sql-Server may have several emitters. Each issuer can issue their tax bills. Each invoice shall have a…
-
1
votes1
answer70
viewsA: Share on a web service with the client
Since you didn’t specify which language you use in your presentation, I’m assuming you’re sweating some C solution#. In this way, what you have to do is create an empty Web Application project.…
-
0
votes1
answer49
viewsA: How to create List of a class within another class and not be mapped in Entity Frameworks
The ideal would be for you to create a class Manager for Camera, it would be like this. public class Cameras : List<Camera> { } You could also use ICollection<Camara> but I believe I…
-
1
votes1
answer96
viewsA: How to have a unique id and then recover that id on the php page to write to the database
Ideal for Unique Id is working with Guid. I use this function in javascript to generate my Guid. function createGuid() { function s4() { return Math.floor((1 + Math.random()) *…
-
3
votes1
answer100
viewsQ: What precautions should I take when creating tables with 1:1 relationship?
Basically I’m in doubt about when I should use 1:1 relationship or a large table. In my case I would have the object public class Person(){ public Guid Id {get;set;} public string Name {get;set;}…
-
0
votes3
answers578
viewsA: How to put two action with HTTPPOST
In the statement of Controller use RoutePrefix, would be asism: [RoutePrefix("api/service")] public class ServiceController : ApiController In the functions you must declare as follows:…
-
0
votes0
answers58
viewsQ: Face Detect with Javascript
I’m developing an application using Ionic1, I need to develop a function that will identify a person by photo. Anyone knows any plugin that would help me with this? I came to find this service:…
-
1
votes1
answer967
viewsA: Entity Framework Core Error
Good afternoon! I imagine Pessoa and Atleta are in the 1:1 relationship and Code First. Read this article:…
-
0
votes1
answer679
viewsA: Upload a PDF file
Basically you need to recover the Base64 of the file selected in <input>, and send it to your server using the $http.post. Basically I learned by seeing this component posted on github, visit…
-
0
votes3
answers363
viewsA: I cannot use the Find() method using Entityframework
Good afternoon! Check that the context being passed to the repository is correct. I’ve used this format before, and what you’re presenting should work. Apparently you have a problem in the instance…
-
1
votes3
answers973
viewsA: Websocket - c# . NET
The Signalr par Amim today is the best solution dem websocket c#. I think it’s worth studying a little bit about him. I use in some applications of mine, it is very simple to make and manage the…
-
0
votes2
answers31
viewsA: Jsonresult values are received by javascript but fields do not receive value
Good morning Cyberiacs, to serialize json in my Rest applications I use Newtonsoftjson - https://www.newtonsoft.com/json A configuration has to be made in Startup.js in the Configuration method…