コード例 #1
0
        public IActionResult Put(int id, [FromBody] keyvalueModel value)
        {
            ApplicationMaster _applicationMaster = new ApplicationMaster()
            {
                ApplicationId = value.Id, ApplicationName = value.keyValue, IsDeleted = false
            };

            TicketDB.Entry(_applicationMaster).State = EntityState.Modified;
            return(Ok(TicketDB.SaveChanges()));
        }
コード例 #2
0
        public IActionResult Put(int id, [FromBody] Tickets value)
        {
            Tickets _ticket = new Tickets()
            {
                TicketId = id, Title = value.Title, Tdescription = value.Tdescription, CreatedBy = value.CreatedBy, StatusId = value.StatusId, Createddate = value.Createddate, AssignedTo = value.AssignedTo, PriorityId = value.PriorityId, TypeId = value.TypeId, ApplicationId = value.ApplicationId, ModuleId = value.ModuleId, ResponseDeadline = value.ResponseDeadline, ResolutionDeadline = value.ResolutionDeadline, RootCauseId = value.RootCauseId, Comments = value.Comments, UpdatedBy = Convert.ToInt32(GetClaimValue(ClaimTypes.Name)), LastModifiedon = value.LastModifiedon
            };

            if (_ticket.TicketId == 0)
            {
                TicketDB.Tickets.Add(_ticket);
            }
            else
            {
                TicketDB.Entry(_ticket).State = EntityState.Modified;
            }
            return(Ok(TicketDB.SaveChanges()));
        }
コード例 #3
0
        public IActionResult Put(int id, [FromBody] TodoList value)
        {
            TodoList _todoitem = new TodoList()
            {
                TodoId = value.TodoId, Userid = value.Userid, Titile = value.Titile, Description = value.Description, ActionDate = value.ActionDate, IsActive = value.IsActive
            };

            if (_todoitem.TodoId == 0)
            {
                TicketDB.TodoList.Add(_todoitem);
            }
            else
            {
                TicketDB.Entry(_todoitem).State = EntityState.Modified;
            }
            TicketDB.SaveChanges();
            return(Ok(1));
        }