Example #1
0
        public List <MdlADDRESSS> OrgAddressAlterList(long Id)
        {
            int ID    = Convert.ToInt32(Id);
            var query = _dbFirms.usp_GetPrimaryAdressIDofanOrg(ID);
            //Old one query
            //  var query = _dbFirms.ADDRESSSes.Where(n => n.OrgDoc_ID == Id).ToList();
            List <MdlADDRESSS> list = new List <MdlADDRESSS>();

            foreach (var item in query)
            {
                list.Add(new MdlADDRESSS()
                {
                    AdressID      = item.AdressID,
                    AdressDetails = item.AdressDetails,
                    //  AdressTypeName=item.AdressTypeName

                    // Selected = item.OrgDoc_ID == id ? true : false
                });
            }
            return(list);
        }