internal static Media InstantiateMedia( Library owningLibrary, MediaType type, string name, string description) { Media media = InstantiateOrphanedMedia(type, name, description); media.Library = owningLibrary; return media; }
protected Member( Library owningLibrary, string name, DateTime dateOfBirth, MemberStatus status) { OwningLibrary = owningLibrary; Name = name; DateOfBirth = dateOfBirth; Status = status; }
private static void LoadSingleSystemLibrary() { IList<Library> libraryList = Repository .CreateQuery<Library>() .List<Library>(); // there should be one, and only one library in the system ... if (libraryList.Count < 1) { throw new Exception("no library found in database"); } if (libraryList.Count > 1) { throw new Exception("more than 1 library found in database"); } _library = libraryList[0]; }
public static Library InstantiateLibrary() { Library library = new Library(); DomainRegistry.Repository.Add(library); return library; }
public static Member InstantiateMember(Library owningLibrary, string name, DateTime dateOfBirth, MemberStatus status) { return new Member(owningLibrary, name, dateOfBirth, status); }