コード例 #1
0
        public void AddOrganization(Organization objectToAdd, string dataBaseName)
        {
            UniversityContext context;

            switch (dataBaseName)
            {
                case "MsSqlFirstDatabase":
                    context = m_firstUniversityContext;
                    break;
                case "MsSqlSecondDatabse":
                    context = m_thirdUniversityContext;
                    break;
                default:
                    return;
            }
            context.Organizations.Add(objectToAdd);
            context.SaveChanges();
        }
コード例 #2
0
 public void AddOrganization(Organization baseObject)
 {
     m_client.AddOrganization(baseObject, baseObject.DbLocation);
 }