public static ServiceMethod CreateNew(ServiceMethodDetails details) { var id = Guid.NewGuid(); var serviceMethod = new ServiceMethod(id, details); serviceMethod.RegisterEvent(new ServiceMethodAddedEvent { Id = serviceMethod.Id, Name = serviceMethod.Details.Name }); return(serviceMethod); }
public ServiceMethod(Guid id, ServiceMethodDetails details) { Id = id; Details = details; }