public async Task <IActionResult> PutUni(Guid id, Uni uni)
        {
            if (id != uni.UniId)
            {
                return(BadRequest());
            }

            _context.Entry(uni).State = EntityState.Modified;

            try
            {
                await _context.SaveChangesAsync();
            }
            catch (DbUpdateConcurrencyException)
            {
                if (!UniExists(id))
                {
                    return(NotFound());
                }
                else
                {
                    throw;
                }
            }

            return(NoContent());
        }
        public async Task <ActionResult <Uni> > PostUni(Uni uni)
        {
            _context.Uni.Add(uni);
            try
            {
                await _context.SaveChangesAsync();
            }
            catch (DbUpdateException)
            {
                if (UniExists(uni.UniId))
                {
                    return(Conflict());
                }
                else
                {
                    throw;
                }
            }

            return(CreatedAtAction("GetUni", new { id = uni.UniId }, uni));
        }
Example #3
0
        public override void HandleMessage(BaseMessage message)
        {
            ServerTickMessage serverTickMessage = (ServerTickMessage)message;

            Uni.Tick(serverTickMessage);
        }
Example #4
0
 public UniCreatedDomainEvent(int attachmentId, Uni uni)
 {
     AttachmentId = attachmentId;
     Uni          = uni;
 }
Example #5
0
 public UniCreationFailedDomainEvent(int attachmentId, Uni uni)
 {
     AttachmentId = attachmentId;
 }
Example #6
0
 public Student
     (string firstName = "", string middleName = "", string surName = "", Course course = Course.I, Speciality speciality = Speciality.Agriculture, Uni uni = Uni.VTU, string email = "", uint mobile = 0000000)
 {
     this.FirstName          = firstName;
     this.MiddleName         = middleName;
     this.SurName            = surName;
     this.Course             = course;
     this.Speciality         = speciality;
     this.Uni                = uni;
     this.Email              = email;
     this.Mobile             = mobile;
     Student.studentCounter += 1;
 }
Example #7
0
 private void QuitButton_ClickEvent(object sender, Reusable.Event.ClickEventArgs e)
 {
     FMODUtil.RaiseEvent(SoundsTable.UIClick);
     Uni.GameExitHandler();
 }