Posts by L. Jhon • 101 points
11 posts
-
1
votes1
answer73
viewsA: Pass a list to a view to get via Javascript
public JsonResult MinhaLista(int id) { _check.NumberOfregistrationUser = id; // variável que guarda o resultado da minha consulta var list =…
-
0
votes3
answers182
viewsA: Error submitting form with ASP MVC
Dude, create a private method that populates your viewBags and call in actionResult Register in the verb GET and in the POST, the error message appears because even if successful or not when…
-
0
votes2
answers464
viewsA: Save Objects Relationship Only - Entity Framework
Brother, you will have to retrieve the object A or B from the database and leave it with track in context and add the object A_B to the recovered object, so Entity will understand that the recovered…
-
3
votes2
answers60
viewsA: Search for inconsistency in a C#list
You can try using the . All() extension method, but you will have to pass the project as parameter. If you inform the LG Project in João’s list, the method will return you true and when you do the…
-
1
votes1
answer51
viewsA: C# API - Update
Check if the object you return to API is the same as the one you updated. If you are retrieving the database object after the update, try using Asnotracking in the query to not ask for information…
-
1
votes0
answers87
viewsQ: Specifications and Dapper
Hello, does anyone know any extension of dapper that makes it possible to use Specifications (Expression<Func<T, bool>>) in c#?
-
0
votes3
answers682
viewsA: How to mount a lambda expression and pass it by parameter to a Generic function?
Hello, I have prepared an example of generic method for you to use as you asked (or asked if it was possible rs, c# is possible =D ) Generic method: public IEnumerable<TEntity>…
-
0
votes1
answer75
viewsA: Error creating Entity framework
Hello, Without your table creation script and the error information by Exception, there is some field in your table with white space in the name.
entity-frameworkanswered L. Jhon 101 -
0
votes2
answers222
viewsA: How to show the Getall data I performed in an HTML table? MVC C# HTML
Hello, Brow! From what I saw in your code, you are returning to the view the same client you are receiving as parameter in the Actionresult List. Change to: public ActionResult List(Cliente cliente)…
-
0
votes1
answer266
views -
1
votes2
answers98
viewsA: EF6: Error while Saving
You’ll have to do the EntityState.Unchanged for each Category instance in the Products collection. For example: public void Adicionar(Produto produto) { foreach(var cat in produto.Categoria)…