Posts by Thiago Ubiratan • 353 points
18 posts
-
-3
votes1
answer262
viewsQ: Read Json Angular 9 format
my api returns a json format as follows { "Errors": [], "Result": [ { "CompanyName": "teste inicio", "FantasyName": "inicio" }, { "CompanyName": "teste meio", "FantasyName": "meio" }, {…
-
1
votes1
answer105
viewsA: Update Role of the ASP.NET Identity user
Then question resolved as follows [HttpPost] [AccessDeniedAuthorizeAttribute(Roles = "Administrador")] public ActionResult UserEdit(ApplicationUser appuser) { var context = new…
-
0
votes1
answer105
viewsQ: Update Role of the ASP.NET Identity user
hello guys I am finding it difficult to update the user role when updating my data, my roles are being filled by a Viewbag in my get from my controller and I am retrieving the new ID from my…
-
3
votes1
answer501
viewsQ: Fill in date and time in View mvc 5 Razor
I have a registration form where I have a record date field that I currently fill in my save method, only that my server is hosted in another country where the field is being filled in from the…
-
0
votes1
answer651
viewsQ: Filter a NULL type in lambda Expression or Line
Hello, my entity To has a long type attribute that can be NULL making relationship with the entity B, by making a filter with a Lambda expression with this attribute to bring all records that are…
-
0
votes1
answer577
viewsQ: working with decimal {5,2} Rails
I created my first API in Rails, and I’m using a simple model with to create a basic Crud, I managed to put my application to work I created the cute GET method returned 200, but in my POST is…
-
3
votes1
answer179
viewsQ: Migrations, Updating a null field to not null
I am updating the phone field and CPF of my User entity that was allowing nulls to not nulls. follow the migration file public partial class Required_fild_users_cpf_phone : DbMigration { public…
-
1
votes2
answers51
viewsQ: Filtering through empty children
I have two entities (TipoDeRequerimento and TipoRequerimentoSituaçãoAcademica) in my query. Today I can make a filter to bring the Types of requirements that have a certain academic situation…
-
0
votes1
answer169
viewsA: Error While Running Migrations
the solution found was to return the migration to the previous point of the relationship, in my case it worked because the previous migration was to link the tables follows the command…
-
1
votes1
answer169
viewsQ: Error While Running Migrations
Friends, I have two entities Deliveryfee and City, where Deliveryfee has a FK from City, when I went to withdraw the relationship between the two and ran the Migration he returned me the following…
-
0
votes4
answers1252
viewsA: What are ASAX extensions for?
good morning! on the ASP.NET architecture, Global.asax is responsible for configuring application and session events.
-
2
votes3
answers393
viewsQ: Sort children in consultation Linq
I’m having trouble making an ordination in a query where I have to sort the children by the ID, Follow the Source. public Grid GetByOrderGridData(long id) { var query = from c in…
-
1
votes1
answer1618
viewsA: What is the difference between $_GET and $_POST?
The big difference between GET and POST methods is probably visibility. A GET request is sent as a string attached to the URL, while the POST request is encapsulated next to the HTTP request body…
-
1
votes1
answer237
viewsQ: FK error while running Migrations on C#
I have the following scenario public class branch() { public Branch() { Branchs = new HashSet<Branch>(); } [StringLength(80)] public string Description { get; set; } [Required]…
-
0
votes2
answers1454
viewsQ: apply filter in return from a list
I’m making an appointment where I have one array of situations ex: 1, 2, 3 in the query I have to filter through these situations, follow my code. var array = GetSituacoes(); var lista = bll.Query(p…
-
2
votes1
answer278
viewsQ: Inserting and updating data in N-N tables (many to many)
I’m having trouble saving in a relationship of many to many, follows my model: public class Pessoa { public int id { get; set; } public string descricao { get; set; } public ICollection<Conta>…
-
2
votes1
answer65
viewsQ: Save and update entities
or personal I am trying to give an improved in my generic method that adds and updates, follows the code: public void InsertOrUpdate(T entity) { if (entity.Id == 0) {…
-
4
votes1
answer90
viewsQ: bring menus and active submenus C#
I have to make a query through the menu I have to bring only the active submenus, see my code. return context.Set<Menu>().Include("MenuGroups") .Where(x => x.Id == id &&…