Posts by Nicola Bogar • 123 points
14 posts
-
0
votes0
answers38
viewsQ: Query with Leftjoins using Groupby Includes are not performed EF.Core C#
I need to perform a query with the Entity framework where I have an entity Offer and in it I have several Cards (Entity). In the query I am performing the card include, and using Selectmany to…
-
1
votes1
answer317
viewsQ: Instances of Singleton Asp.Net Core classes
I have a doubt in the following situation: Singleton Classe namespace TesteSingleton { public class Singleton { private Singleton _singleton; public Singleton() { if (_singleton == null) _singleton…
-
0
votes0
answers308
viewsQ: What better way to work/store files in Base64 C# + Sqlserver
I am consuming an external API, and in return I have a PDF file in format base64, would like to know how best to work/store this kind of data in the database SqlServer + C#. My question is: 1 - I…
-
5
votes2
answers203
viewsQ: When to use "Try catch" in layered application?
Let’s say I have my layers Controller Business Repository so it is necessary to create this block in the 3 layers or create only in the controller? If I do this she ensures that every code that is…
-
0
votes2
answers62
viewsQ: Request API not working on ASP.NET Core 2.1
I’m having trouble testing my end-points with the post and Asp.net core 2.1. Controller Base public class ControladorBase : Controller { protected IMapper _Mapper; public ControladorBase() { }…
-
0
votes0
answers41
viewsQ: Migration does not run on EF Core 2.0
When Perform Add-Migration Init no message is shown and Migration is not performed and the prompt is in the state again PM> I checked that you are taking Entityframeworkcore.Tools 2.0.3 instead…
-
1
votes0
answers38
viewsQ: Problem accessing the Controller
Apicontroller [Produces("application/json")] [Route("api/[controller]")] public class ClienteController : Controller { private IClienteRepository _ClienteRepository; public…
-
1
votes0
answers563
viewsQ: Set Fixed Port for Projected Web API Asp.net Core C#
I would like to know how to set up a standard fixed port for my Web API application on Asp.net core.
-
0
votes2
answers107
viewsA: Code-First Fluent API with complex classes in ASP.NET Core 2.1
I solved my problem this way: In the complex class instead of using the [ComplexType] used the [Owned] [Owned] public class DadosPessoais { public string NumeroCpf { get; set; } public string…
-
0
votes2
answers107
viewsQ: Code-First Fluent API with complex classes in ASP.NET Core 2.1
Error while performing the Add-Migration when using Complextype classes. public class Cliente : EntityBase { public Cliente() { #region Create HashSet Properties Lists Dependences Titulares = new…
-
0
votes1
answer464
viewsQ: How to add include by expression in Repository Pattern C#
I am creating a Repositorybase (Repository Pattern) with Entityframework Asp.Net Core, and in it I am creating a Where method, where I pass a Where expression of the entity. So far the method works…
-
0
votes1
answer43
viewsQ: Conversion of Types with Fluenti API to EF Core 2.1
I would like to know if it is possible to make the following conversion: public class Pessoa { public bool Ativo { get; set; } } public class PessoaMap: IEntityTypeConfiguration<Pessoa> {…
-
3
votes2
answers84
viewsQ: Using interfaces for domain classes
Is it good practice to make use of domain class interfaces? Do I have an advantage in doing so? If so, which one? Example: public interface IAuditoria { long AuditoriaID { get; set; } string…
-
0
votes1
answer311
viewsQ: How to format a field with ASP.NET Webforms C#
I need to format Textbox <asp:TextBox runat="server" id="txtValor" MaxLength="20"></asp:TextBox and I’m having a lot of difficulty, first this grid is open in a modal, I mean, when I create…