Пример #1
0
        /// <summary>
        /// Return book by the given user
        /// </summary>
        /// <param name="user">User which borrowed book</param>
        public void Return(IdentityUser <Guid> user)
        {
            IsBorrowed = false;
            var action = new BookAction()
            {
                Name = BookAction.Action_Return,
                Date = DateTime.Now,
                User = user,
            };

            Actions.Add(action);
        }
Пример #2
0
        /// <summary>
        /// Borrow book by the given user
        /// </summary>
        /// <param name="user">User which borrow book</param>
        public void Borrow(IdentityUser <Guid> user)
        {
            IsBorrowed = true;
            var action = new BookAction()
            {
                Name = BookAction.Action_Borrow,
                Date = DateTime.Now,
                User = user,
            };

            Actions.Add(action);
        }