Exemple #1
0
        public bool Create([FromBody] BankDTO bank)
        {
            QuestionBank newBank = new QuestionBank {
                Id           = Guid.NewGuid(),
                OwnerId      = user.Id,
                Name         = bank.Name,
                Description  = bank.Description,
                ModifiedDate = DateTime.Now
            };

            return(repository.Create(newBank));
        }
Exemple #2
0
        public bool Update([FromBody] BankDTO bank)
        {
            QuestionBank updatedBank = new QuestionBank
            {
                Id           = bank.Id,
                OwnerId      = user.Id,
                Name         = bank.Name,
                Description  = bank.Description,
                ModifiedDate = DateTime.Now
            };

            return(repository.Update(updatedBank));
        }