예제 #1
0
        public async Task <IActionResult> SignUpAsync([FromBody] int courseID, int studentID)
        {
            //put the request on a queue
            //Redis, SQS on amazon

            //this task will be in sql server and then the chama.console will wait for requests

            var newTask = new Queue();

            newTask.CourseId  = courseID;
            newTask.StudentId = studentID;

            await _chamaContext.AddAsync(newTask);

            await _chamaContext.SaveChangesAsync();

            return(Ok("We have receveid your request and we will inform you by email!"));
        }
예제 #2
0
 public async Task <int> SaveChanges()
 {
     return(await Db.SaveChangesAsync());
 }
예제 #3
0
 public async Task <bool> Commit()
 {
     return(await _context.SaveChangesAsync() > 0);
 }