free

.NET Core with Angular with authentication and CRUD example

Fully functional SPA .NET Core application with latest version of Angular (up to Junuary 2018). Contains registration and login + simple CRUD operations example. It's made to be run both server and client in Visual Studio using Gulp.

Total downloads: 141

*If you like what we are doing please support us with a dollar or just like us!

Please register or login to get access to all templates! Register / Login

Included Features

  • Extented separation of concerns

    Current implementation details

    There is implemented separation between: The web application, The web application infrastructure changes, The database connection, The database models (the tables), The database extentions, The services related to the data access, The services related to the web tasks, Separate test projects for all parts of the application, Separate projects for tools like crawlers, helpers and ect.

    General feature info

    In computer science, separation of concerns (SoC) is the process of breaking a computer program into distinct features that overlap in functionality as little as possible. A concern is any piece of interest or focus in a program. Typically, concerns are synonymous with features or behaviors. Progress towards SoC is traditionally achieved through modularity and encapsulation, with the help of information hiding.

    Main feature's video


  • Extented database models

    Current implementation details

    C# is Object oriented language, so when creating the database models one can use all the features comming from the OOP. Therefore we have extracted BaseModel which is inherited by all the database models. This class contains all the common properties between the them like Id, CreationData, Deletion date and ect.

    General feature info

    Inheritance, together with encapsulation and polymorphism, is one of the three primary characteristics of object-oriented programming. Inheritance enables you to create new classes that reuse, extend, and modify the behavior that is defined in other classes. The class whose members are inherited is called the base class, and the class that inherits those members is called the derived class. A derived class can have only one direct base class. However, inheritance is transitive. If ClassC is derived from ClassB, and ClassB is derived from ClassA, ClassC inherits the members declared in ClassB and ClassA.

    Main feature's video


  • Automatic handle of the common properties of the database models

    Current implementation details

    In addition of the extraction of the common properties between the models, we have implented them to be automatically handled. So when you creating or updating a database model, the database contect handles the corresponding properties by it self. This is done by a simple override of the SaveChanges method of the context.

    General feature info

    The Entity Framework determines how an entity has changed (and therefore which updates need to be sent to the database) by comparing the current values of an entity with the original values. The original values are stored when the entity is queried or attached

    Main feature's video


  • Repository and unit of work patterns

    Current implementation details

    There is implemented generic repository pattern to ease the CRUD operations over the database models. To combine all of the repositories and to create an abstraction level over the database we have implemented a 'unit of work' pattern. It's also purposed to ensure that all the transactions would be executed as one load. This certain implementation of the 'Repository pattern' aslo provides upgraded deletion functionality which can delete entity from the database or just 'mark it' as deleted. Moreover it automatically keeps updated a certain properties about the deleted file (which are marked as deleted) like when is deleted.

    General feature info

    There are many ways to implement the repository and unit of work patterns. You can use repository classes with or without a unit of work class. You can implement a single repository for all entity types, or one for each type. If you implement one for each type, you can use separate classes, a generic base class and derived classes, or an abstract base class and derived classes. You can include business logic in your repository or restrict it to data access logic. You can also build an abstraction layer into your database context class by using IDbSet interfaces there instead of DbSet types for your entity sets. The approach to implementing an abstraction layer shown in this tutorial is one option for you to consider, not a recommendation for all scenarios and environments.

    Main feature's video


  • Automapper

    Current implementation details

    First, you need both a source and destination type to work with. The destination type's design can be influenced by the layer in which it lives, but AutoMapper works best as long as the names of the members match up to the source type's members. If you have a source member called 'FirstName', this will automatically be mapped to a destination member with the name 'FirstName'. AutoMapper also supports Flattening. AutoMapper will ignore null reference exceptions when mapping your source to your target.This is by design.If you don't like this approach, you can combine AutoMapper's approach with Custom - value - resolvers if needed. Once you have your types you can create a map for the two types using a MapperConfiguration or the static Mapper instance and CreateMap. You only need one MapperConfiguration instance typically per AppDomain and should be instantiated during startup.Alternatively, you can just use Mapper.Initialize(more examples of initial setup see in [Static - and - Instance - API](https://github.com/AutoMapper/AutoMapper/wiki/Static-and-Instance-API) ).Most applications can use dependency injection to inject the created IMapper instance. AutoMapper also has non-generic versions of these methods, for those cases where you might not know the type at compile time.

    General feature info

    AutoMapper is a simple little library built to solve a deceptively complex problem - getting rid of code that mapped one object to another. This type of code is rather dreary and boring to write. AutoMapper provides simple configuration of types, as well as simple testing of mappings.Mapping can occur in many places in an application, but mostly in the boundaries between layers, such as between the UI/Domain layers, or Service/Domain layers. Concerns of one layer often conflict with concerns in another, so object-object mapping leads to segregated models, where concerns for each layer can affect only types in that layer.AutoMapper is an object-object mapper. Object-object mapping works by transforming an input object of one type into an output object of a different type. What makes AutoMapper interesting is that it provides some interesting conventions to take the dirty work out of figuring out how to map type A to type B. As long as type B follows AutoMapper's established convention, almost zero configuration is needed to map two types

    Main feature's video


  • Token Authentication

    Current implementation details

    Implemented Jwt Token Authentication

    General feature info

    JSON Web Token (JWT) is an open standard (RFC 7519) that defines a compact and self-contained way for securely transmitting information between parties as a JSON object. This information can be verified and trusted because it is digitally signed. JWTs can be signed using a secret (with the HMAC algorithm) or a public/private key pair using RSA.

    Main feature's video

    No video about this feature yet

  • Angular client

    Current implementation details

    Implemented Angular client side authentication, plus CRUD operations. The client application is configured to run on the same server as the backend application.

    General feature info

    Angular is the next big deal. Being the successor of the overwhelmingly successful Angular.js framework it’s bound to shape the future of frontend development in a similar way. The powerful features and capabilities of Angular allow you to create complex, customizable, modern, responsive and user friendly web applications. Angular 4 simply is the latest version of the Angular framework and simply an update to Angular 2. Angular is faster than Angular 1 and offers a much more flexible and modular development approach. After taking this course you’ll be able to fully take advantage of all those features and start developing awesome applications immediately.

    Main feature's video

    No video about this feature yet