public static List <OwnerListViewModel> GetOwnerList() { List <OwnerListViewModel> ownerList = new List <OwnerListViewModel>(); var Data = OwnerService.GetOwnerList(); if (Data != null) { foreach (var item in Data) { ownerList.Add(new OwnerListViewModel() { ContactNo = item.ContactNo, GSTNo = item.GSTNo, Id = item.Id, OwnerAddress = item.OwnerAddress, OwnerName = item.OwnerName }); } } return(ownerList); }