protected virtual IPermissionStateCreated Map(ICreatePermission c) { var stateEventId = new PermissionEventId(c.PermissionId, c.Version); IPermissionStateCreated e = NewPermissionStateCreated(stateEventId); e.Name = c.Name; e.ParentPermissionId = c.ParentPermissionId; e.Description = c.Description; e.Active = c.Active; e.CommandId = c.CommandId; e.CreatedBy = (string)c.RequesterId; e.CreatedAt = ApplicationContext.Current.TimestampService.Now <DateTime>(); var version = c.Version; return(e); }
protected virtual IPermissionStateCreated Map(ICreatePermission c) { var stateEventId = new PermissionStateEventId(c.PermissionId, c.Version); IPermissionStateCreated e = NewPermissionStateCreated(stateEventId); e.Name = c.Name; e.ParentPermissionId = c.ParentPermissionId; e.Description = c.Description; e.Active = c.Active; e.CommandId = c.CommandId; e.CreatedBy = (string)c.RequesterId; e.CreatedAt = DateTime.Now; var version = c.Version; return(e); }
public virtual void Create(ICreatePermission c) { IPermissionStateCreated e = Map(c); Apply(e); }
public virtual void When(ICreatePermission c) { Update(c, ar => ar.Create(c)); }
void IPermissionApplicationService.When(ICreatePermission c) { this.When((CreatePermissionDto)c); }