planettelex / Bloom

Bloom Music Suite
Apache License 2.0
2 stars 0 forks source link

Create Static Factory Create Methods for Domain Classes #103

Closed RobDixonIII closed 9 years ago

RobDixonIII commented 9 years ago

In order to have constancy in the instantiation of domain classes, but without interfering with the default constructor (the LINQ to SQL requires), add a static create method to all domain classes that get directly instanciated.

This method, unlike the constructor, can have required parameters. It should also perform tasks like creating the id, and making sure collections aren't null.

RobDixonIII commented 9 years ago

Also add methods that safely and conveniently add to internal collections.