public Trailer CreateTrailer(string model, int maximumWeightKg, int capacity, int numberAxles, decimal height, decimal width, decimal length) { var trailer = Trailer.Create(model, maximumWeightKg, capacity, numberAxles, height, width, length); trailersRepository?.Add(trailer); persistenceContext?.SaveChanges(); return(trailer); }