Beispiel #1
0
        public IList<FlatBO> GetFlats(int societyId)
        {
            var objPersonsDL = new ResidentsSvcDL();

            // The data type of flats is DbSet<Flat>
            var flats = objPersonsDL.GetFlats(societyId);

            //Return a list of Flats as per the business objects
            IList<FlatBO> fbo = new List<FlatBO>();
            foreach (var f in flats)
            {
                FlatBO a = new FlatBO();
                a.FlatId = f.Id;
                a.FlatName = f.FlatNo;
                a.NoOfResidents = Convert.ToInt32(f.NoOfResidents);
                fbo.Add(a);
            }
            return fbo;
        }