Пример #1
0
        public static Organization GetOrganizationById(string id)
        {
            OrganizationInfo orgInfo = OrganizationInfoRepo
                                       .Read()
                                       .FirstOrDefault(org => org.Id == id);

            return(orgInfo.MappingTo <Organization>());
        }
Пример #2
0
        /// <summary>
        /// 获得一个组织
        /// </summary>
        /// <param name="code"></param>
        /// <returns></returns>
        public static Organization GetOrganization(string code)
        {
            OrganizationInfo orgInfo = OrganizationInfoRepo
                                       .Read()
                                       .FirstOrDefault(org => org.Code == code);

            return(orgInfo.MappingTo <Organization>());
        }
Пример #3
0
        public static void Save(OrganizationInfo organizationInfo)
        {
            var organization = organizationInfo.MappingTo <Organization>();

            organization.Save();
        }