pauloanalista / prmtoolkit.notificationpattern Goto Github PK
View Code? Open in Web Editor NEWprmToolkit.NotificationPattern é uma classe que nos permite adicionar notificações para nossas entidades e objetos de valor.
prmToolkit.NotificationPattern é uma classe que nos permite adicionar notificações para nossas entidades e objetos de valor.
Boa tarde, tudo bem?
Consegue incluir uma função, para gerar um notificação com base em um Regex customizado?
Desde já agradeço
Adicionei a validação na minha classe de entidade conforme abaixo, e no momento de gerar atualizar minha base de dados via migration (update-database), foi me retornado a seguinte mensagem: "The entity type 'Notification' requires a primary key to be defined."
using Imperium.Domain.Entities.Base;
using Imperium.Domain.Enums;
using Imperium.Domain.ValueObjects;
using prmToolkit.NotificationPattern;
namespace Imperium.Domain.Entities
{
public class Company : EntityBase
{
public string CompanyName { get; private set; }
public string FantasyName { get; private set; }
public Email Email { get; private set; }
public string CNPJ { get; private set; }
public Address Address { get; private set; }
public EnumStatus Status { get; private set; }
private Company()
{
}
public Company(string companyName, string fantasyName, Email email, string cnpj)
{
CompanyName = companyName;
FantasyName = fantasyName;
Email = email;
CNPJ = cnpj;
new AddNotifications<Company>(this).IfNotCnpj(x => x.CNPJ);
}
public Company(string companyName, string fantasyName, Email email, string cnpj, Address address)
{
CompanyName = companyName;
FantasyName = fantasyName;
Email = email;
CNPJ = cnpj;
Address = address;
Status = EnumStatus.Pendente;
}
}
}
using prmToolkit.NotificationPattern;
using System;
using System.ComponentModel.DataAnnotations;
namespace Imperium.Domain.Entities.Base
{
public abstract class EntityBase : Notifiable
{
[Key]
public Guid Id { get; private set; }
protected EntityBase()
{
Id = Guid.NewGuid();
}
}
}
teste
Possibilitar a verificação de uma data. IfInvalidDate por exemplo.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.