예제 #1
0
        public static TeacherMasterModel Mapping(TeacherMaster db)
        {
            TeacherMasterModel model = new TeacherMasterModel();

            model.TeacherId    = db.TeacherId;
            model.FirstName    = db.FirstName;
            model.LastName     = db.LastName;
            model.FullName     = db.FirstName + " " + db.LastName;
            model.EmailAddress = db.EmailAddress;
            model.SchoolId     = db.SchoolId;
            model.SchoolName   = db.SchoolMaster.SchoolName;
            model.IsActive     = db.IsActive;
            model.IsDelete     = db.IsDelete;
            model.CreatedBy    = db.CreatedBy;
            model.CreatedOn    = db.CreatedOn;
            model.UpdateBy     = db.UpdateBy;
            model.UpdatedOn    = db.UpdatedOn;
            model.UserId       = db.UserId;
            model.lstStandard  = new List <StandardMasterModel>();

            if (db.TeacherStandardMappings != null)
            {
                foreach (TeacherStandardMapping master in db.TeacherStandardMappings)
                {
                    model.lstStandard.Add(StandardMasterModel.Mapping(master.StandardMaster));
                }
            }

            return(model);
        }
예제 #2
0
        public static StandardMasterModel Mapping(StandardMaster db)
        {
            StandardMasterModel model = new StandardMasterModel();

            model.StandardId = db.StandardId;
            model.Standard   = db.Standard;
            model.IsActive   = db.IsActive;
            model.IsDelete   = db.IsDelete;
            model.CreatedBy  = db.CreatedBy;
            model.CreatedOn  = db.CreatedOn;
            model.UpdatedBy  = db.UpdatedBy;
            model.UpdatedOn  = db.UpdatedOn;

            return(model);
        }