using CloudBuilder.Core.DependencyInjection.Request;
using CloudBuilder.Core.Request;
using CloudBuilder.Core.Service;
using Microsoft.Extensions.DependencyInjection;
using CloudBuilder.Security.Service;
            using CloudBuilder.Core.DatabaseAccessor.Entity;
            using Microsoft.AspNetCore.Http;
            using CloudBuilder.Core.Policy;
            using CloudBuilder.Core.DependencyInjection.Request;
            using CloudBuilder.Security.Data;
            using CloudBuilder.Core.Authorization;
            using CloudBuilder.Security.Entity;
            using CloudBuilder.Security.SearchCriteria;
            using CloudBuilder.Security;
            using System;
            
namespace CloudBuilder.Request.Security
{

public class SecurityGeneratorNumberRequest : IRequest
{

private readonly IServiceRequest serviceRequest;
public SecurityGeneratorNumberRequest(IServiceRequest serviceRequest)
{
this.serviceRequest = serviceRequest;
}

        public  SecurityGeneratorNumberEntity FindByKey(Int32 key)       
                {
return Task.Run(() =>   serviceRequest.PostAsJsonAsync<SecurityGeneratorNumberEntity>("/SecurityGeneratorNumber/FindByKey?key=" + key.ToString())).GetAwaiter().GetResult();                }

                        public  SecurityGeneratorNumberResultData FindBySearchCriteria(SecurityGeneratorNumberSearchCriteria criteria)       
                {
return Task.Run(() =>   serviceRequest.PostAsJsonAsync<SecurityGeneratorNumberSearchCriteria,SecurityGeneratorNumberResultData>("/SecurityGeneratorNumber/FindBySearchCriteria" , criteria)).GetAwaiter().GetResult();                }

                        public  dynamic PrintBySearchCriteria(SecurityGeneratorNumberSearchCriteria criteria)       
                {
return Task.Run(() =>   serviceRequest.PostAsJsonAsync<SecurityGeneratorNumberSearchCriteria,dynamic>("/SecurityGeneratorNumber/PrintBySearchCriteria" , criteria)).GetAwaiter().GetResult();                }

                        public  SecurityGeneratorNumberEntity Insert(SecurityGeneratorNumberEntity data)       
                {
return Task.Run(() =>   serviceRequest.PostAsJsonAsync<SecurityGeneratorNumberEntity,SecurityGeneratorNumberEntity>("/SecurityGeneratorNumber/Insert" , data)).GetAwaiter().GetResult();                }

                        public  SecurityGeneratorNumberEntity Update(SecurityGeneratorNumberEntity data)       
                {
return Task.Run(() =>   serviceRequest.PostAsJsonAsync<SecurityGeneratorNumberEntity,SecurityGeneratorNumberEntity>("/SecurityGeneratorNumber/Update" , data)).GetAwaiter().GetResult();                }

                        public void Delete(Int32 key)       
                {
 Task.Run(() =>   serviceRequest.PostAsync("/SecurityGeneratorNumber/Delete?key=" + key.ToString())).GetAwaiter().GetResult();                }

                
}
}