public void CreateDefaultRoles() { _rolesRepository.AddRol(new Rol { CreatedAt = DateTime.Now, Name = UserRoles.Customer.ToStringValue(), UpdatedAt = DateTime.Now, }); _rolesRepository.AddRol(new Rol { CreatedAt = DateTime.Now, Name = UserRoles.Salesman.ToStringValue(), UpdatedAt = DateTime.Now, }); _rolesRepository.AddRol(new Rol { CreatedAt = DateTime.Now, Name = UserRoles.Manager.ToStringValue(), UpdatedAt = DateTime.Now, }); _rolesRepository.AddRol(new Rol { CreatedAt = DateTime.Now, Name = UserRoles.Administrator.ToStringValue(), UpdatedAt = DateTime.Now, }); _rolesRepository.AddRol(new Rol { CreatedAt = DateTime.Now, Name = UserRoles.SuperUser.ToStringValue(), UpdatedAt = DateTime.Now, }); }
private void AddRol(Rol rol) { rol.CreatedAt = DateTime.Now; rol.UpdatedAt = DateTime.Now; _rolesRepository.AddRol(rol); }