示例#1
0
        public void AddLibrary(LibraryDTO libraryDTO)
        {
            var library = LibraryCoreConverter.ToDAL(libraryDTO);

            library.SongsIds = new List <Guid>();
            libraryDbList.InsertOne(library);
        }
示例#2
0
        public Guid Add(LibraryDTO libraryDTO)
        {
            var library = LibraryCoreConverter.ToDAL(libraryDTO);

            library.Id = new Guid();

            _context.Libraries.Add(library);

            return(library.Id);
        }