public async Task AddAgentTypeMaster(AgentTypeMaster prodData)
        {
            var maxId = await WithConnection(async c =>
            {
                return await c.QueryAsync<int>("SELECT max(AgentTypeID) FROM AgentTypeMaster");
            });

            //Setting Primary Key
            if (maxId.SingleOrDefault() == 0)
            {
                prodData.AgentTypeID = 1;
            }
            else
            {
                prodData.AgentTypeID = maxId.SingleOrDefault() + 1;
            }

            //Filling Other Records like User Id, Creation & Update Date
            prodData.CreateUserIndex = 1; //Later Logged in User
            prodData.UpdateUserIndex = 1; //Later Logged in User
            prodData.CreateDateTime = DateTime.Now;
            prodData.UpdateDateTime = DateTime.Now;

            await WithConnection(async c =>
            {
                return await c.QueryAsync<int>(SQLConstants.InsertAgentTypeMaster, prodData);
            });
        }
 public async Task<IHttpActionResult> Create(AgentTypeMaster prodData)
 {
     if (prodData != null)
     {
         await AgentTypeMasterDA.AddAgentTypeMaster(prodData);
         return Ok();
     }
     return BadRequest("Request cannot be NULL");
 }