Beispiel #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);
        }
Beispiel #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);
        }