Giter Club home page Giter Club logo

equinoxproject's Introduction


image

Check my Popular Repos ⭐🔥


Follow me here 💻🚀

RD Badge MVP Badge Linkedin Badge Instagram Badge Facebook Badge Twitter Badge

equinoxproject's People

Contributors

albertomonteiro avatar andreluizsecco avatar danrrodrigues avatar douglasoliveirabh avatar eduardopires avatar edumartins7 avatar ericguim avatar kiq7 avatar patrickreinan avatar thiagolunardi avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

equinoxproject's Issues

Help!

Hello @EduardoPires I have built my project around EquinoxProject was wondering can you help me with something?

Project - Documentation??

Hi,
This is a great project for me to learn and contribute.
I have cloned and running it to test.

Is there a document or e-book available for better understanding the details?

Thanks.

Tests end to end

Pires acredito que seria interessante um exemplo de boas praticas para implementar testes end to end. Talvez com Xunit

Does not work removal customer

Good afternoon.
Does not work removal Customers. The necessary rights to delete were issued when the user was created:

public async Task Register(RegisterViewModel model, string returnUrl = null)
{
....
user.Claims.Add(new IdentityUserClaim
{
ClaimType = "Customers",
ClaimValue = "Write"
});
user.Claims.Add(new IdentityUserClaim
{
ClaimType = "Customers",
ClaimValue = "Remove"
});
....
}
But when you delete Customers, redirect to the page "Access Denied".
If calls are rearranged in places, create a new user, logs in under it, then deletion starts to work, but creation and editing does not work.

Claims not working

Hello Eduardo,

I don't know why but the user can't register a new customer: "You don't have enough access.". If I change [Authorize(Policy = "CanWriteCustomerData")] to [Authorize] it works.

Where to put WEB API?

In my next project I would like to use this as an starting point, however we also need to create a REST API to expose system functionality, where would this project fit in the entire architecture?

Entity Relations.

Can you please add a complicated MODEL and show how can we implement ONE-Many and Many-Many relations also?.

Método ToTable dentro do método Map

Olá Eduardo, tudo bem? Notei que você teve que fazer uma esquema para conseguir mapear os campos dentro de classe separada, porem o método ToTable não veio na extensão que você criou, forçando então ter que criar no método OnModelCreating da classe Context.

Teria alguma sugestão?

Tks

Error : Value cannot be null

Hello @EduardoPires im trying to update-database the database but its giving me the error below can you maybe assist me with this problem?

PM> Update-Database
System.ArgumentNullException: Value cannot be null.
Parameter name: connectionString
   at Microsoft.EntityFrameworkCore.Utilities.Check.NotEmpty(String value, String parameterName)
   at Microsoft.EntityFrameworkCore.SqlServerDbContextOptionsExtensions.UseSqlServer(DbContextOptionsBuilder optionsBuilder, String connectionString, Action`1 sqlServerOptionsAction)
   at Panda.Web.Startup.<ConfigureServices>b__4_0(DbContextOptionsBuilder options) in C:\Users\nico\Documents\Visual Studio 2017\Projects\Panda\Panda.Web\Startup.cs:line 37
   at Microsoft.Extensions.DependencyInjection.EntityFrameworkServiceCollectionExtensions.DbContextOptionsFactory[TContext](IServiceProvider applicationServiceProvider, Action`2 optionsAction)
   at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitScoped(ScopedCallSite scopedCallSite, ServiceProvider provider)
   at Microsoft.Extensions.DependencyInjection.ServiceProvider.<>c__DisplayClass16_0.<RealizeService>b__0(ServiceProvider provider)
   at Microsoft.Extensions.DependencyInjection.ServiceProviderServiceExtensions.GetRequiredService(IServiceProvider provider, Type serviceType)
   at Microsoft.Extensions.DependencyInjection.ServiceProviderServiceExtensions.GetRequiredService[T](IServiceProvider provider)
   at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitScoped(ScopedCallSite scopedCallSite, ServiceProvider provider)
   at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitClosedIEnumerable(ClosedIEnumerableCallSite closedIEnumerableCallSite, ServiceProvider provider)
   at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitTransient(TransientCallSite transientCallSite, ServiceProvider provider)
   at Microsoft.Extensions.DependencyInjection.ServiceProvider.<>c__DisplayClass16_0.<RealizeService>b__0(ServiceProvider provider)
   at Microsoft.Extensions.DependencyInjection.ServiceProviderServiceExtensions.GetRequiredService(IServiceProvider provider, Type serviceType)
   at Microsoft.Extensions.DependencyInjection.ServiceProviderServiceExtensions.GetRequiredService[T](IServiceProvider provider)
   at Microsoft.EntityFrameworkCore.Design.Internal.DbContextOperations.FindContextTypes()
   at Microsoft.EntityFrameworkCore.Design.Internal.DbContextOperations.FindContextType(String name)
   at Microsoft.EntityFrameworkCore.Design.Internal.DbContextOperations.CreateContext(String contextType)
   at Microsoft.EntityFrameworkCore.Design.Internal.MigrationsOperations.UpdateDatabase(String targetMigration, String contextType)
   at Microsoft.EntityFrameworkCore.Design.OperationExecutor.UpdateDatabase.<>c__DisplayClass0_1.<.ctor>b__0()
   at Microsoft.EntityFrameworkCore.Design.OperationExecutor.OperationBase.Execute(Action action)
**Value cannot be null.**

appsettings.json

{
  "ConnectionStrings": {
    "DefaultConnection": "Server=(localdb)\\mssqllocaldb;Database=Panda;Trusted_Connection=True;MultipleActiveResultSets=true"
  },
  "Logging": {
    "IncludeScopes": false,
    "LogLevel": {
      "Default": "Debug",
      "System": "Information",
      "Microsoft": "Information"
    }
  }
}

About Async Controllers

hi there,

How can I have async Controllers in the project?
It would be great if you have guide me on that. And also do I need to use MQ or MediatR etc. for Async operation?

Please let me know

Thanks & Regards,
Sunny Dave

Version 2 UI

Hello,
The road map mentions a new front end. Will it still be pure ASP.NET MVC or will you use a JavaScript framework?

Thanks, and can't wait for Version 2!

Run weapi and and site

Hello,

How can I run both weapi and and site ?

If I go to the webapi folder and run the dotnet run command, I can't access the site URL. The same if I run dotnet run in the site folder..

Thanks.

v2 Branch

Hi,

i'd like to know if you could please make your version 2 branch public?
Because i like to compare the concepts you plan to use.

Regards

EventStore as NoSQL database

Event sourcing mainly is composed by objects notation data. So, reduce friction and (des) serializations persisting them as documents.

Can't remove `Customer`

Hello, Eduardo.

I've seen the closed topics regarding this issue, but even with the changes proposed either by you or some other users, I still can't remove a Customer. I'm being redirected to the Access Denied page.

EDIT: The Azure project is not working either.

Thanks so far.

Add a components diagram

Could you add a components diagram like layer diagram or so.
It will help to understand relations and whole architecture.

Migrations Problem

I am trying to use Migrations beside sql script
But migrations' some is in Equinox.Infra.CrossCutting.Identity and others in Equinox.Infra.Data

how to use them

--- after afew try

      dotnet ef database update --context  EquinoxContext  --startup-project ../Equinox.UI.Site
      
      dotnet ef database update --context  EventStoreSQLContext --startup-project ../Equinox.UI.Site

commands worked fine but what about

      Infra.CrossCutting.Identity project migrations ?

regards

Integration with .net core api (Dapper with mysql connector)

I'm developing a Web API with .Net core api 1.1. After searching I can't find any document or sample that use authorization without the use of Entity Framework. Instead of this i need to use dapper with a mysql connector in order to connect my app with a mysql server. Is it possible to do it with your library ? If yes please can i have an example ?

Question about validation

Hi,

Thanks for this effort, it is really valuable for a lot of people.

I have a question about validation from some time ago and it applies to this type of architecture. This project is using FluentValidation to specify validation rules on the domain level, and then it uses Data Annotations to specify validation on the application level, is there a way to not specify the validation rules in multiple parts of the application? or is this the recommended way to do it?

Commit on Domain Layers

Hi Eduardo.

I have read in some article that the application layer is the layer responsible for controlling the transactions carried out by the application.

However, in this project the transactions are being commited in Command handlers.

Of course, it would be quiet to inject an IUnityOfWork implementation into the application services, but with that, we would lose the benefit of launching domain events after the commit is completed, from the domain.

It would be kind of weird, like ... Let's launch a domain event, starting from the application layer. O.0

So I'm in a dilemma.
Can I commit the transaction from the domain, or should we improve the design? And besides, how to improve the design?

Thanks for listening!

Problème dans la modification d'un objet par exemple Customer

Bonjour,

Nous ajoutons une colonne "Adresse" à l'entité "Customer". Lors de l'insertion d'une nouvelle ligne, nous affectons la valeur : "Mon-Adresse" à la propriété "Adresse". Maintenant si nous souhaitons modifier toutes les colonnes de l'entité "Customer" sauf "Adresse", cette dernière se retrouve avec dans la base de données : son ancienne valeur a été écrasée.

Merci

How to use SelectListItem for dropdown

Hi

I need to use dropdown. So for example i need to add this
public IEnumerable<SelectListItem> CreditCards { get; set;
to
CustomerViewModel
but SelectListItem is part of Microsoft.AspNetCore.Mvc.ViewFeatures.dll

Is it correct to add MVC dependency to Application project?

Thanks

Uow, Repository and Paged results and Pager

is there anyone worked for paged resultset, for this project.

  • Not sure but when i added pager and filtering is working fine,
    Tryed to pull but dunno how to contribute. And my way is right or not ,for DDD at this point need some help.

https://github.com/digipolisantwerp/dataaccess_aspnetcore

image
image

  • in other hand damienbod has a repo for multiple rdbms here ;
    I tryed this and works with MsSQL, Postgre and MySQL

https://github.com/damienbod/AspNetCoreMultipleProject

Logger questions

Is it possible to write logs into files? and where is the default log file location?

I wonder if I can user Nlogger in the project?

Tests

How to add tests for application and infrastructure parts.

  • Is this way right ? any suggestion

image

ViewModels' validation

Hello,

Let's consider a scenario that we are creating new customer. If I understand correctly, CustomerViewModel's validation is performed firstly on object passed from POST, i.e. on ModelState.

src/Equinox.Application/ViewModels/CustomerViewModel.cs

Then the RegisterNewCustomerCommand is executed and validation is performed using RegisterNewCustomerCommandValidation.

src/Equinox.Domain/Validations/RegisterNewCustomerCommandValidation.cs

I've noticed that there is a difference between the way that CustomerViewModel is being validated in the first step mentioned above and the second one - the name's max length differs.

src/Equinox.Application/ViewModels/CustomerViewModel.cs#L14
src/Equinox.Domain/Validations/CustomerValidation.cs#L13

I aware that it is trivial issue, but maybe it would be better to abstract those validation constants to some static class? Or maybe the validation step should be performed just once?

Please let me know what you think about it 😄

Thanks.

Visual Studio Issue

I have a problem with visual studio 2017 15.3.3 version.
I am trying to use core 2.0 version of this project. clonned and

if i run with F5 then works well, dotnet run works well,
but if i use right click wwwroot and select Wiev In Browser kestrel gives some error that i could not solve.

Equinox.UI.Site> Now listening on: http://localhost:18888
Equinox.UI.Site> Application started. Press Ctrl+C to shut down.
Equinox.UI.Site> info: Microsoft.AspNetCore.Server.Kestrel[17]
Equinox.UI.Site> Connection id "0HL7PLV6P81VF" bad request data: "Malformed request: invalid headers."
Equinox.UI.Site> Microsoft.AspNetCore.Server.Kestrel.Core.BadHttpRequestException: Malformed request: invalid headers.
Equinox.UI.Site> at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.Frame1.<ProcessRequestsAsync>d__2.MoveNext() Equinox.UI.Site> info: Microsoft.AspNetCore.Server.Kestrel[17] Equinox.UI.Site> Connection id "0HL7PLV6P81VF" bad request data: "Malformed request: invalid headers." Equinox.UI.Site> Microsoft.AspNetCore.Server.Kestrel.Core.BadHttpRequestException: Malformed request: invalid headers. Equinox.UI.Site> at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.Frame1.d__2.MoveNext()
Equinox.UI.Site> info: Microsoft.AspNetCore.Server.Kestrel[17]
Equinox.UI.Site> Connection id "0HL7PLV6P81VG" bad request data: "Malformed request: invalid headers."
Equinox.UI.Site> Microsoft.AspNetCore.Server.Kestrel.Core.BadHttpRequestException: Malformed request: invalid headers.
Equinox.UI.Site> at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.Frame1.<ProcessRequestsAsync>d__2.MoveNext() Equinox.UI.Site> info: Microsoft.AspNetCore.Server.Kestrel[17] Equinox.UI.Site> Connection id "0HL7PLV6P81VG" bad request data: "Malformed request: invalid headers." Equinox.UI.Site> Microsoft.AspNetCore.Server.Kestrel.Core.BadHttpRequestException: Malformed request: invalid headers. Equinox.UI.Site> at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.Frame1.d__2.MoveNext()

Lack of documentation

Hello Eduardo

I came across this github repo and its amazing, exactly what I was looking for. However classes are not documented and for a person who doesnt know about DDD a lot then its hard to understand.

Can you please point me in the right direction of what to read first before I can understand your code.

I found these posts but they are quite old and not sure if you took some code from these blog posts (eg EntityBase)

https://dotnetcodr.com/architecture-and-patterns/

Navigation property between Entities

What is the best way to work between entities that have navigation properties?

namespace Equinox.Domain.Models
{
    public class Customer : Entity
    {
        public Customer(Guid id, string name, string email, DateTime birthDate)
        {
            Id = id;
            Name = name;
            Email = email;
            BirthDate = birthDate;
        }

        // Empty constructor for EF
        protected Customer() { }

        public string Name { get; private set; }

        public string Email { get; private set; }

        public DateTime BirthDate { get; private set; }

        public List<CustomerAdress> CustomerAdresses { get; set; }
    }

    public class CustomerAdress : Entity
    {
        public CustomerAdress(Guid id, string name, string country, string region, Guid customerId)
        {
            Id = id;
            Name = name;
            Country = country;
            Region = region;
            CustomerId = customerId;
        }

        protected CustomerAdress() { }
        public string Name { get; private set; } // Home | Work
        public string Country { get; private set; }
        public string Region { get; private set; }
        // ...

        public Guid CustomerId { get; private set; }
        public Customer Customer { get; set; }
    }
}

Map:

namespace Equinox.Infra.Data.Mappings
{    
    public class CustomerMap : EntityTypeConfiguration<Customer>
    {
        public override void Map(EntityTypeBuilder<Customer> builder)
        {
            builder.Property(c => c.Id)
                .HasColumnName("Id");

            builder.Property(c => c.Name)
                .HasColumnType("varchar(100)")
                .HasMaxLength(100)
                .IsRequired();

            builder.Property(c => c.Email)
                .HasColumnType("varchar(100)")
                .HasMaxLength(11)
                .IsRequired();

            builder.HasMany(c => c.CustomerAdresses)
                .WithOne(c => c.Customer)
                .HasConstraintName("FK_Customer_CustomerAdress");
        }
    }
}

How should it be repositories and domain events etc. in this stutation ?

When will Release 2.0

Hello.
Can you please tell me when you plan to release 2.0?
You wrote in the roadmap first quarter.

XSS vulnerability

Hi,

The system has a XSS vulnerability in the auditing/history page.
The JSON data received by the ajax request is not being html-encoded.

Email Queue

In the user register function It would be nice to add the email message to a db table queue
and a scheduled task that sends it,
this is to have a receipt for all outgoing messages

How do I make use of the ValueObject?

Hello, I would like to know how do I use the ValueObject class, can you provide an example of how do you use this class? I know it came from DDD but I never really used it before.

Pull request

Hello Eduardo,

I've implemented JWT access token in WebApi project. I'm trying to send a pull request to your branch but I haven't authorization.

Service should return Domain entity instead of DTO/ViewModel

Service layer should always return database domain entities instead on DTO/ViewModels.
Do not user mapping (e.g. using automapper) in service, do it in controller instead.

e.g.
CustomerAppService.GetById(x) => Customer
instead of
CustomerAppService.GetById(x) => CustomerViewModel

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.