Exemplo n.º 1
0
 internal static Media InstantiateMedia( Library     owningLibrary,
     MediaType   type,
     string      name,
     string      description)
 {
     Media media = InstantiateOrphanedMedia(type, name, description);
     media.Library = owningLibrary;
     return media;
 }
Exemplo n.º 2
0
 protected Member(   Library         owningLibrary,
     string          name,
     DateTime        dateOfBirth,
     MemberStatus    status)
 {
     OwningLibrary = owningLibrary;
     Name = name;
     DateOfBirth = dateOfBirth;
     Status = status;
 }
Exemplo n.º 3
0
        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];
        }
Exemplo n.º 4
0
 public static Library InstantiateLibrary()
 {
     Library library = new Library();
     DomainRegistry.Repository.Add(library);
     return library;
 }
Exemplo n.º 5
0
 public static Member InstantiateMember(Library owningLibrary, string  name, DateTime dateOfBirth, MemberStatus status)
 {
     return new Member(owningLibrary, name, dateOfBirth, status);
 }