Basit Nisar

Basit Nisar

  • 1.7k
  • 84
  • 11k

c#.net web api

Sep 8 2023 5:52 PM

warning restore CS1998 // Async method lacks 'await' operators and will run synchronously

{
    ClaimsPrincipal principal = Request.GetRequestContext().Principal as ClaimsPrincipal;
    Int32 LogedInID = Convert.ToInt32(principal.Claims.FirstOrDefault(t => t.Type == "LogedInID").Value);
    ReleaseNoteViewModel Releasenote = new ReleaseNoteViewModel();
    try
    {
        Releasenote.ReleaseVersionTypeView = db.ReleaseVersions.AsNoTracking().Where(x => x.ReleaseVersionID == ID).OrderBy(x => x.ReleaseVersionName).Select(x => new ReleaseVersionModel
            {
                ReleaseVersionID = x.ReleaseVersionID,
                    ReleaseVersionName = x.ReleaseVersionName,
                    IsCurrentVersion = x.IsCurrentVersion,
                    ReleaseUserTypeView = db.UserTypes.OrderBy(ka => ka.UserTypeName).Select(ka => new UserTypeModel
                        {
                            UserTypeID = ka.UserTypeID,
                                UserTypeName = ka.UserTypeName,
                                //CreatedBy = ka.CreatedBy,
                                //CreatedDate = ka.CreatedDate,
                                //ModifiedBy = ka.ModifiedBy,
                                //ModifiedDate = ka.ModifiedDate,
                                ReleaseItemTypeView = db.ReleaseItemTypes.OrderBy(t => t.ReleaseItemTypeName).Select(t => new
                                    ReleaseItemModel
                                    {
                                        ReleaseItemTypeID = t.ReleaseItemTypeID,
                                            ReleaseItemTypeNote = t.ReleaseItemTypeName,
                                            ReleaseNoteTypeView = db.ReleaseNotes.Where(d => d.ReleaseVersionID == ID).OrderBy(a => a.ReleaseNoteDescription).Select(a => new
                                                ReleaseNotesModel
                                                {
                                                    ReleaseNoteID = a.ReleaseNoteID,
                                                        ReleaseNoteDescription = a.ReleaseNoteDescription,
                                                        ReleaseVersionID = a.ReleaseVersionID,
                                                        ReleaseItemTypeID = a.ReleaseItemTypeID,
                                                        UserTypeID = a.UserTypeID
                                                }).ToList < ReleaseNotesModel > ()
                                    }).ToList < ReleaseItemModel > ()
                        }).ToList < UserTypeModel > ()
            }).ToList < ReleaseVersionModel > ();
    } catch (Exception ex)
    {
        Global.InsertException(ex);
    }
    return Ok(Releasenote);
}

basically my response should be like this

releaseeData = [
    {
        version: 'v5.1.1',
        adjPortal: {
            Enhancements: [{
                heading: 'Profile',
                data: 'Adjusters no longer have the capability to update address on Profile. Must contact Manager or Resource Team staff for any updates. '
            }],
            newFeature: []
        },
        staffApp: {
            Enhancements: [{
                heading: 'CMS Profile Creation',
                data: 'Adjuster’s CMS Profile and Branch Add to the CMS Profile automation will now go forward be triggered when assignment is added (instead of check-in approval)'
            }, {
                heading: 'Commission Assignments',
                data: 'An issue was resolved that was causing delays in the compensation for commission-based adjusters if/when billing was entered post-assignment dates. A grace period (35 days). Compensation is still done on a weekly basis – work needs to be input before Friday to be calculated in payroll.'
            }, {
                heading: 'Admin',
                data: 'Enhancements to the Expenses permission when accessed from adjuster profile. 
            }],
            newFeature: []
        },
        clintPortal: null
    },
    {
        version: 'v5.1',
        adjPortal: {},
        staff: {
            Enhancements: [{
                    heading: 'Update Activity',
                    data: 'A system generated activity note will be added on the adjuster’s profile if/when the Employee Number is updated by a staff user. ',
                },
                {
                    heading: 'Check-Out Questions',
                    data: 'When performing a check-out approval, both staff and Team Manager must have the ability to respond to the questions with a Yes, No or NA option choices. ',
                },
                {
                    heading: 'Performance Survey',
                    data: 'Staff users must have the ability to view the adjuster’s performance survey, post submission by the Team Manager',
                },
                {
                    heading: 'Active CAT Report (Dashboard)',
                    data: 'UI Enhancements for the Graph view. Graph visibility has been enhanced to occupy the full width of the page for better visibility.',
                },
                {
                    heading: 'Hire Date',
                    data: 'taff now have the capability to view/update adjuster’s Hire Date on the Profile using the mobile apps (iOS & Android).',
                },
                {
                    heading: 'Timesheet Push',
                    data: 'Additional validations have been added to prevent duplicate timesheet push (2 open tabs with same user and two different users approving the same timecard) to Bolton. ',
                }
            ],
            Feature: [{
            }]
        },
        client: null
    },
]

 


Answers (2)