Aliyah  Murray

Aliyah Murray

1624918140

Onion Architecture | Soğan Mimarisi | Dotnet Core

SOLID prensiplerini ilke edinerek ortaya çıkmış Clean Architecture, Domain Driven Design gibi kavramlar ve Onion Architecture veya Hexagonal Architecture gibi tasarım kalıpları var. Bunlardan Onion Architecture yani Soğan Mimarisinin ne olduğundan ve ne gibi özellikleri olduğundan bahsettiğim.

#dotnetcore #onionarchitecture #soğanmimarisi
#blazor #docker #dotnet

Kanala Abone Olmayı Unutmayın!
To Subscribe: https://bit.ly/3kvj2vw
Github: https://github.com/salihcantekin

#onionarchitecture #dotnet #soğanmimarisi #docker #blazor

What is GEEK

Buddha Community

Onion Architecture | Soğan Mimarisi | Dotnet Core
Einar  Hintz

Einar Hintz

1602560783

jQuery Ajax CRUD in ASP.NET Core MVC with Modal Popup

In this article, we’ll discuss how to use jQuery Ajax for ASP.NET Core MVC CRUD Operations using Bootstrap Modal. With jQuery Ajax, we can make HTTP request to controller action methods without reloading the entire page, like a single page application.

To demonstrate CRUD operations – insert, update, delete and retrieve, the project will be dealing with details of a normal bank transaction. GitHub repository for this demo project : https://bit.ly/33KTJAu.

Sub-topics discussed :

  • Form design for insert and update operation.
  • Display forms in modal popup dialog.
  • Form post using jQuery Ajax.
  • Implement MVC CRUD operations with jQuery Ajax.
  • Loading spinner in .NET Core MVC.
  • Prevent direct access to MVC action method.

Create ASP.NET Core MVC Project

In Visual Studio 2019, Go to File > New > Project (Ctrl + Shift + N).

From new project window, Select Asp.Net Core Web Application_._

Image showing how to create ASP.NET Core Web API project in Visual Studio.

Once you provide the project name and location. Select Web Application(Model-View-Controller) and uncheck HTTPS Configuration. Above steps will create a brand new ASP.NET Core MVC project.

Showing project template selection for .NET Core MVC.

Setup a Database

Let’s create a database for this application using Entity Framework Core. For that we’ve to install corresponding NuGet Packages. Right click on project from solution explorer, select Manage NuGet Packages_,_ From browse tab, install following 3 packages.

Showing list of NuGet Packages for Entity Framework Core

Now let’s define DB model class file – /Models/TransactionModel.cs.

public class TransactionModel
{
    [Key]
    public int TransactionId { get; set; }

    [Column(TypeName ="nvarchar(12)")]
    [DisplayName("Account Number")]
    [Required(ErrorMessage ="This Field is required.")]
    [MaxLength(12,ErrorMessage ="Maximum 12 characters only")]
    public string AccountNumber { get; set; }

    [Column(TypeName ="nvarchar(100)")]
    [DisplayName("Beneficiary Name")]
    [Required(ErrorMessage = "This Field is required.")]
    public string BeneficiaryName { get; set; }

    [Column(TypeName ="nvarchar(100)")]
    [DisplayName("Bank Name")]
    [Required(ErrorMessage = "This Field is required.")]
    public string BankName { get; set; }

    [Column(TypeName ="nvarchar(11)")]
    [DisplayName("SWIFT Code")]
    [Required(ErrorMessage = "This Field is required.")]
    [MaxLength(11)]
    public string SWIFTCode { get; set; }

    [DisplayName("Amount")]
    [Required(ErrorMessage = "This Field is required.")]
    public int Amount { get; set; }

    [DisplayFormat(DataFormatString = "{0:MM/dd/yyyy}")]
    public DateTime Date { get; set; }
}

C#Copy

Here we’ve defined model properties for the transaction with proper validation. Now let’s define  DbContextclass for EF Core.

#asp.net core article #asp.net core #add loading spinner in asp.net core #asp.net core crud without reloading #asp.net core jquery ajax form #asp.net core modal dialog #asp.net core mvc crud using jquery ajax #asp.net core mvc with jquery and ajax #asp.net core popup window #bootstrap modal popup in asp.net core mvc. bootstrap modal popup in asp.net core #delete and viewall in asp.net core #jquery ajax - insert #jquery ajax form post #modal popup dialog in asp.net core #no direct access action method #update #validation in modal popup

Aron  Lemke

Aron Lemke

1621053660

Tiny Difference, Big Consequences: SignalR in .NET Core 3.1 vs. .NET 5

In a past blog post I wrote about a surprising change I encountered during the migration of a .NET Core 2.2 application to .NET Core 3.0. I have just migrated that same application to .NET 5 and guess what, I stumbled across another “tiny difference with big consequences”.

The situation: I have a WPF desktop client that communicates with an ASP.NET Core server that in turn communicates with a small TypeScript browser application. I use Web API for accessing files and meta data, and SignalR to call remote functions.

After the migration I ran the application and things were working fine – until a certain point, where I received the following exception in a call of SignalR’s HubConnection.InvokeCoreAsync() (actual function name replaced with “doSomething”):

Microsoft.AspNetCore.SignalR.HubException
   HResult=0x80131500
   Message=Failed to invoke 'doSomething' due to an error on the server.
   Source=System.Private.CoreLib

#signalr #dotnet #aspdotnet core #dotnet core #dotnet core 3.1 #dotnet 5

Obie  Stracke

Obie Stracke

1621163760

.NET Core 2.1, 3.1 and .NET 5.0 updates are coming to Microsoft Update

Starting in December 2020, we will be delivering .NET Core updates on Windows via Microsoft Update. We have received many requests for this, particularly from organizations that acquire and manage all of their Microsoft-related updates via Microsoft (or Windows) Update. This change will enable organizations to manage .NET Framework and .NET Core updates in the same way. If you don’t want to use Microsoft Update to update .NET on your machines, you don’t have to, and can continue using one of the existing options.

Applications using the Framework Dependent Deployment model will benefit from .NET Core updates delivered by Microsoft update. There is no change to apps that use the Self-Contained Deployment model, these apps are still responsible for keeping the runtime updated.

#microsoft update #dotnet 5 #dotnet #dotnet core #dotnet update

Aliyah  Murray

Aliyah Murray

1624918140

Onion Architecture | Soğan Mimarisi | Dotnet Core

SOLID prensiplerini ilke edinerek ortaya çıkmış Clean Architecture, Domain Driven Design gibi kavramlar ve Onion Architecture veya Hexagonal Architecture gibi tasarım kalıpları var. Bunlardan Onion Architecture yani Soğan Mimarisinin ne olduğundan ve ne gibi özellikleri olduğundan bahsettiğim.

#dotnetcore #onionarchitecture #soğanmimarisi
#blazor #docker #dotnet

Kanala Abone Olmayı Unutmayın!
To Subscribe: https://bit.ly/3kvj2vw
Github: https://github.com/salihcantekin

#onionarchitecture #dotnet #soğanmimarisi #docker #blazor

Milan  Reilly

Milan Reilly

1623296340

Async Streaming with EF Core and ASP.NET Core 6

A long running problem in ASP.NET has been the inability to handle returning large JSON files without consuming a lot of memory. The default behavior for the framework is to buffer the entire output at once, convert it en masse to JSON, and then start feeding the results to the client. This can lead to out-of-memory situations if the amount of data is large enough.

The inability to stream results was never a fundamental problem for ASP.NET. When working with simpler formats such as CSV, the developer has always had the ability write directly to the result stream.

Starting with ASP.NET Core 5, the Utf8JsonWriter class can be used for the same effect. The code has a few complexities to it, such as the need to explicitly disable buffering, but can work if you follow the instructions provided by Alexander Vasilyev.

#dotnet #aspdotnet core #dotnet 6 #ef core