Changeset 56

User picture

Author: marisic.net

(2008/12/23 20:26) About 3 years ago


  

Affected files

Updated UnityWeb/UnityWeb/Deploy/Development/ConnectionString.config Download diff

5556
1
<connectionStrings>
1
<connectionStrings>
2
  <add name="AdventureWorksConnection" connectionString="Integrated Security=SSPI;Persist Security Info=False;Data Source=LocalServer;Initial Catalog=Northwind" providerName="System.Data.SqlClient"/>
2
  <add name="NorthwindConnection" connectionString="Integrated Security=SSPI;Persist Security Info=False;Data Source=LocalServer;Initial Catalog=Northwind" providerName="System.Data.SqlClient"/>
3
</connectionStrings>
3
</connectionStrings>

Updated UnityWeb/UnityWeb/Domain/Business/Address.cs Download diff

5556
1
#region Using Statements
1
#region Using Statements
2
2
3
using System;
4
using System.Diagnostics;
5
3
4
6
#endregion
5
#endregion
7
6
8
namespace Domain.Business
7
namespace Domain.Business

Updated UnityWeb/UnityWeb/Domain/Business/Employee.cs Download diff

5556
18
        //public string Suffix { get; set; }
18
        //public string Suffix { get; set; }
19
        public string Phone { get; set; }
19
        public string Phone { get; set; }
20
        public string Salutation { get; set; }
20
        public string Salutation { get; set; }
21
        public string JobTitle { get; set; }        
21
        public string JobTitle { get; set; }
22
    }
22
    }
23
}
23
}

Updated UnityWeb/UnityWeb/Domain/Business/Product.cs Download diff

5556
4
    {
4
    {
5
        public int Id { get; set; }
5
        public int Id { get; set; }
6
        public string ProductName { get; set; }
6
        public string ProductName { get; set; }
7
        public Supplier Supplier { get; set; }
7
        public virtual Supplier Supplier { get; set; }
8
        public Category Category { get; set; }
8
        public virtual Category Category { get; set; }
9
        public string QuantityPerUnit { get; set; }
9
        public string QuantityPerUnit { get; set; }
10
        public double UnitPrice { get; set; }
10
        public double UnitPrice { get; set; }
11
        public int UnitsInStock { get; set; }
11
        public int UnitsInStock { get; set; }

Updated UnityWeb/UnityWeb/Domain/Business/Region.cs Download diff

5556
1
#region Using Statements
1
#region Using Statements
2
2
3
using System;
4
using System.Diagnostics;
5
3
4
6
#endregion
5
#endregion
7
6
8
namespace Domain.Business.Active
7
namespace Domain.Business.Active

Updated UnityWeb/UnityWeb/Domain/Business/Territory.cs Download diff

5556
3
using System;
3
using System;
4
using System.Diagnostics;
4
using System.Diagnostics;
5
using Domain.Business.Active.Enum;
5
using Domain.Business.Active.Enum;
6
using Domain.Business.Active.Enum;
7
6
8
#endregion
7
#endregion
9
8

Updated UnityWeb/UnityWeb/Repository/NHibernateDataAccess/Mapping/CustomerMap.cs Download diff

5556
15
        public CustomerMap()
15
        public CustomerMap()
16
        {
16
        {
17
            WithTable("Customers");
17
            WithTable("Customers");
18
            Id(x => x.Id, "CustomerID");
18
            base.Id(x => x.Id, "CustomerID");
19
19
20
            //non-nullable string with a length of 16
20
            //non-nullable string with a length of 16
21
            //Map(x => x.).WithLengthOf(16).CanNotBeNull();
21
            //base.Map(x => x.).WithLengthOf(16).CanNotBeNull();
22
22
23
            //simple properties
23
            //simple properties
24
            Map(x => x.Address).WithLengthOf(15);
24
            base.Map(x => x.Address).WithLengthOf(15);
25
            Map(x => x.City).WithLengthOf(60);
25
            base.Map(x => x.City).WithLengthOf(60);
26
            Map(x => x.CompanyName).WithLengthOf(40);
26
            base.Map(x => x.CompanyName).WithLengthOf(40);
27
            Map(x => x.ContactName).WithLengthOf(30);
27
            base.Map(x => x.ContactName).WithLengthOf(30);
28
            Map(x => x.ContactTitle).WithLengthOf(30);
28
            base.Map(x => x.ContactTitle).WithLengthOf(30);
29
            Map(x => x.Country).WithLengthOf(15);
29
            base.Map(x => x.Country).WithLengthOf(15);
30
            Map(x => x.Fax).WithLengthOf(24);
30
            base.Map(x => x.Fax).WithLengthOf(24);
31
            Map(x => x.Phone).WithLengthOf(24);
31
            base.Map(x => x.Phone).WithLengthOf(24);
32
            Map(x => x.PostalCode).WithLengthOf(10);
32
            base.Map(x => x.PostalCode).WithLengthOf(10);
33
            Map(x => x.Region).WithLengthOf(15);
33
            base.Map(x => x.Region).WithLengthOf(15);
34
        }
34
        }
35
35
36
        #region IMapGenerator Members
36
        #region IMapGenerator Members

Updated UnityWeb/UnityWeb/Repository/NHibernateDataAccess/Mapping/EmployeeMap.cs Download diff

5556
15
        public EmployeeMap()
15
        public EmployeeMap()
16
        {
16
        {
17
            WithTable("Employees");
17
            WithTable("Employees");
18
            Id(x => x.Id, "EmployeeID").GeneratedBy.Identity();
18
            base.Id(x => x.Id, "EmployeeID").GeneratedBy.Identity();
19
19
20
            //non-nullable string with a length of 16
20
            //non-nullable string with a length of 16
21
            //Map(x => x.).WithLengthOf(16).CanNotBeNull();
21
            //base.Map(x => x.).WithLengthOf(16).CanNotBeNull();
22
22
23
            //simple properties
23
            //simple properties
24
            Map(x => x.Salutation, "TitleOfCourtesy").WithLengthOf(25);
24
            base.Map(x => x.Salutation, "TitleOfCourtesy").WithLengthOf(25);
25
            Map(x => x.FirstName).WithLengthOf(10);
25
            base.Map(x => x.FirstName).WithLengthOf(10);
26
            Map(x => x.LastName).WithLengthOf(20);
26
            base.Map(x => x.LastName).WithLengthOf(20);
27
            Map(x => x.JobTitle,"Title").WithLengthOf(30);
27
            base.Map(x => x.JobTitle, "Title").WithLengthOf(30);
28
           // Map(x => x.BirthDate);
28
            // base.Map(x => x.BirthDate);
29
           /*  Map(x => x.HireDate);
29
            /*  base.Map(x => x.HireDate);
30
           Map(x => x.Phone,"HomePhone").WithLengthOf(24);
30
           base.Map(x => x.Phone,"HomePhone").WithLengthOf(24);
31
31
32
            Component<Address>(employee => employee.Address,
32
            Component<Address>(employee => employee.Address,
33
                             address =>
33
                             address =>
34
                             {
34
                             {
35
                                 address.Map(a => a.City).WithLengthOf(15);
35
                                 address.base.Map(a => a.City).WithLengthOf(15);
36
                                 address.Map(a => a.CountryRegionName).WithLengthOf(15);
36
                                 address.base.Map(a => a.CountryRegionName).WithLengthOf(15);
37
                                 address.Map(a => a.PostalCode).WithLengthOf(10);                                
37
                                 address.base.Map(a => a.PostalCode).WithLengthOf(10);                                
38
                                 address.Map(a => a.StateProvinceName).WithLengthOf(15);
38
                                 address.base.Map(a => a.StateProvinceName).WithLengthOf(15);
39
                                 address.Map(a => a.AddressLine1,"Address").WithLengthOf(60);
39
                                 address.base.Map(a => a.AddressLine1,"Address").WithLengthOf(60);
40
                             }
40
                             }
41
              ); */
41
              ); */
42
        }
42
        }

Updated UnityWeb/UnityWeb/Repository/NHibernateDataAccess/Mapping/TerritoryMap.cs Download diff

5556
1
#region Using Statements
1
#region Using Statements
2
2
3
using System.Xml;
3
using System.Xml;
4
using Domain.Business;
5
using Domain.Business.Active;
4
using Domain.Business.Active;
6
using FluentNHibernate;
5
using FluentNHibernate;
7
using FluentNHibernate.Mapping;
6
using FluentNHibernate.Mapping;
...
...
16
        public TerritoryMap()
15
        public TerritoryMap()
17
        {
16
        {
18
            WithTable("Territories");
17
            WithTable("Territories");
19
            Id(x => x.Id, "TerritoryID");
18
            base.Id(x => x.Id, "TerritoryID");
20
            SetAttribute("lazy", "false");
19
            base.SetAttribute("lazy", "false");
21
20
22
            //non-nullable string with a length of 16
21
            //non-nullable string with a length of 16
23
            //Map(x => x.).WithLengthOf(16).CanNotBeNull();
22
            //Map(x => x.).WithLengthOf(16).CanNotBeNull();
24
23
25
            //simple properties
24
            //simple properties
26
            Map(x => x.Description, "TerritoryDescription");
25
            base.Map(x => x.Description, "TerritoryDescription");
27
26
28
            References(x => x.Region, "RegionId")
27
            base.References(x => x.Region, "RegionId")
29
                .Cascade.SaveUpdate();
28
                .Cascade.SaveUpdate();
30
        }
29
        }
31
30

Updated UnityWeb/UnityWeb/Repository/NHibernateDataAccess/NHibernateSessionManager.cs Download diff

5556
18
    public class NHibernateSessionManager : INHibernateSessionManager
18
    public class NHibernateSessionManager : INHibernateSessionManager
19
    {
19
    {
20
        private static readonly Configuration configuration = MsSqlConfiguration.MsSql2005
20
        private static readonly Configuration configuration = MsSqlConfiguration.MsSql2005
21
            .ConnectionString.FromConnectionStringWithKey("AdventureWorksConnection")
21
            .ConnectionString.FromConnectionStringWithKey("NorthwindConnection")
22
            .Dialect("NHibernate.Dialect.MsSql2005Dialect")
22
            .Dialect("NHibernate.Dialect.MsSql2005Dialect")
23
            .Driver("NHibernate.Driver.SqlClientDriver")
23
            .Driver("NHibernate.Driver.SqlClientDriver")
24
            .Provider("NHibernate.Connection.DriverConnectionProvider")
24
            .Provider("NHibernate.Connection.DriverConnectionProvider")
...
...
62
                .WithConvention(convention => convention.GetTableName = type => type.Name + "s")
62
                .WithConvention(convention => convention.GetTableName = type => type.Name + "s")
63
                .WithConvention(convention => convention.GetPrimaryKeyNameFromType = type => type.Name + "ID")
63
                .WithConvention(convention => convention.GetPrimaryKeyNameFromType = type => type.Name + "ID")
64
                .WithConvention(convention => convention.GetForeignKeyName = prop => prop.Name + "ID")
64
                .WithConvention(convention => convention.GetForeignKeyName = prop => prop.Name + "ID")
65
                .WithConvention(c => c.OneToManyConvention = m =>
66
                                                                 {
67
                                                                     m.Cascade.All();
68
                                                                     m.LazyLoad();
69
                                                                 })
65
                .ForTypesThatDeriveFrom<Employee>(autoMap =>
70
                .ForTypesThatDeriveFrom<Employee>(autoMap =>
66
                                                      {
71
                                                      {
67
                                                          autoMap.Map(p => p.JobTitle, "Title");
72
                                                          autoMap.Map(p => p.JobTitle, "Title");
...
...
74
                                                          autoMap.Map(p => p.CompanyName).CanNotBeNull();
79
                                                          autoMap.Map(p => p.CompanyName).CanNotBeNull();
75
                                                      })
80
                                                      })
76
                .ForTypesThatDeriveFrom<Category>(autoMap =>
81
                .ForTypesThatDeriveFrom<Category>(autoMap =>
77
78
                                                      {
82
                                                      {
79
                                                          autoMap.WithTable("Categories");
83
                                                          autoMap.WithTable("Categories");
80
                                                          autoMap.Map(p => p.Name, "CategoryName");
84
                                                          autoMap.Map(p => p.Name, "CategoryName");

Updated UnityWeb/UnityWeb/Repository/NHibernateDataAccess/NotNeeded_YAY_FluentNHibernate/hibernate.cfg.xml Download diff

5556
1
<?xml version="1.0" encoding="utf-8" ?>
1
<?xml version="1.0" encoding="utf-8" ?>
2
<hibernate-configuration xmlns="urn:nhibernate-configuration-2.2">
2
<hibernate-configuration xmlns="urn:nhibernate-configuration-2.2">
3
	<session-factory name="UnitTest">
3
	<session-factory name="UnitTest">
4
		<property name="connection.connection_string_name">AdventureWorksConnection</property>
4
		<property name="connection.connection_string_name">NorthwindConnection</property>
5
		<property name="dialect">NHibernate.Dialect.MsSql2005Dialect</property>
5
		<property name="dialect">NHibernate.Dialect.MsSql2005Dialect</property>
6
		<property name="connection.provider">NHibernate.Connection.DriverConnectionProvider</property>
6
		<property name="connection.provider">NHibernate.Connection.DriverConnectionProvider</property>
7
		<property name="connection.driver_class">NHibernate.Driver.SqlClientDriver</property>
7
		<property name="connection.driver_class">NHibernate.Driver.SqlClientDriver</property>

Updated UnityWeb/UnityWeb/Repository/NHibernateDataAccess/Providers/CustomerDataProvider.cs Download diff

5556
20
            _session = sessionManager.GetSession();
20
            _session = sessionManager.GetSession();
21
        }
21
        }
22
22
23
        #region INHibernateDataProvider Members
23
        #region ICustomerDataProvider Members
24
24
25
        IList<Customer> ICustomerDataProvider.GetCustomers()
25
        IList<Customer> ICustomerDataProvider.GetCustomers()
26
        {
26
        {
27
            _session.Flush();
27
            _session.Flush();
28
            return _session.CreateCriteria(typeof(Customer)).List<Customer>();
28
            return _session.CreateCriteria(typeof (Customer)).List<Customer>();
29
        }
29
        }
30
30
31
        Customer ICustomerDataProvider.GetCustomer(string id)
31
        Customer ICustomerDataProvider.GetCustomer(string id)
32
        {
32
        {
33
            _session.Flush();
33
            _session.Flush();
34
            return _session.Get<Customer>(id);
34
            return _session.Get<Customer>(id);
35
36
        }
35
        }
37
36
38
        void ICustomerDataProvider.AddCustomer(Customer Customer)
37
        void ICustomerDataProvider.AddCustomer(Customer Customer)

Updated UnityWeb/UnityWeb/Repository/NHibernateDataAccess/Providers/EmployeeDataProvider.cs Download diff

5556
21
            _session = sessionManager.GetSession();
21
            _session = sessionManager.GetSession();
22
        }
22
        }
23
23
24
        #region INHibernateDataProvider Members
24
        #region IEmployeeDataProvider Members
25
25
26
        IList<Employee> IEmployeeDataProvider.GetEmployees()
26
        IList<Employee> IEmployeeDataProvider.GetEmployees()
27
        {
27
        {

Updated UnityWeb/UnityWeb/Repository/NHibernateDataAccess/Providers/Interfaces/IProductDataProvider.cs Download diff

5556
1
#region Using Statements
2
1
using System.Collections.Generic;
3
using System.Collections.Generic;
2
using Domain.Business;
4
using Domain.Business;
3
5
6
#endregion
7
4
namespace Repository.NHibernateDataAccess.Providers.Interfaces
8
namespace Repository.NHibernateDataAccess.Providers.Interfaces
5
{
9
{
6
    public interface IProductDataProvider
10
    public interface IProductDataProvider
7
    {
11
    {
8
        IList<Product> GetProducts();
12
        IList<Product> GetProducts();
13
        Product GetProduct(int id);
9
    }
14
    }
10
}
15
}

Updated UnityWeb/UnityWeb/Repository/NHibernateDataAccess/Providers/ProductDataProvider.cs Download diff

5556
22
22
23
        #region Implementation of IProductDataProvider
23
        #region Implementation of IProductDataProvider
24
24
25
        public IList<Product> GetProducts()
25
        IList<Product> IProductDataProvider.GetProducts()
26
        {
26
        {
27
            _session.Flush();
27
            _session.Flush();
28
            return _session.CreateCriteria(typeof (Product)).List<Product>();
28
            return _session.CreateCriteria(typeof (Product))
29
                .SetCacheable(true)
30
                .SetCacheMode(CacheMode.Normal)
31
                .List<Product>();
29
        }
32
        }
30
33
34
        Product IProductDataProvider.GetProduct(int id)
35
        {
36
            _session.Flush();
37
            return _session.Get<Product>(id);
38
        }
39
31
        #endregion
40
        #endregion
32
    }
41
    }
33
}
42
}

Updated UnityWeb/UnityWeb/Repository/Test/NHibernateRepositoryTest/CustomerDataProviderTest.cs Download diff

5556
1
#region Using Statements
1
#region Using Statements
2
2
3
using System;
3
using System;
4
using System.Collections;
5
using System.Collections.Generic;
6
using Domain.Business;
4
using Domain.Business;
7
using Microsoft.Practices.Unity;
5
using Microsoft.Practices.Unity;
8
using Microsoft.VisualStudio.TestTools.UnitTesting;
6
using Microsoft.VisualStudio.TestTools.UnitTesting;
...
...
33
        {
31
        {
34
            set
32
            set
35
            {
33
            {
36
                IDictionary x = TestContext.Properties;
34
                var x = TestContext.Properties;
37
                _provider = value;
35
                _provider = value;
38
            }
36
            }
39
        }
37
        }
...
...
87
        [TestMethod]
85
        [TestMethod]
88
        public void GetCustomers()
86
        public void GetCustomers()
89
        {
87
        {
90
            IList<Customer> Customers = _provider.GetCustomers();
88
            var Customers = _provider.GetCustomers();
91
            Assert.IsNotNull(Customers);
89
            Assert.IsNotNull(Customers);
92
            Assert.IsTrue(Customers.Count > 0);
90
            Assert.IsTrue(Customers.Count > 0);
93
            Assert.IsFalse(string.IsNullOrEmpty(Customers[0].Id));
91
            Assert.IsFalse(string.IsNullOrEmpty(Customers[0].Id));
...
...
98
        public void GetCustomer()
96
        public void GetCustomer()
99
        {
97
        {
100
            const string id = "ALFKI";
98
            const string id = "ALFKI";
101
            Customer Customer = _provider.GetCustomer(id);
99
            var Customer = _provider.GetCustomer(id);
102
            Customer = _provider.GetCustomer(id);
100
            Customer = _provider.GetCustomer(id);
103
101
104
            Assert.IsNotNull(Customer);
102
            Assert.IsNotNull(Customer);

Updated UnityWeb/UnityWeb/Repository/Test/NHibernateRepositoryTest/EmployeeDataProviderTest.cs Download diff

5556
1
#region Using Statements
1
#region Using Statements
2
2
3
using System.Collections.Generic;
4
using Domain.Business;
3
using Domain.Business;
5
using Domain.Business.Active;
6
using Microsoft.Practices.Unity;
4
using Microsoft.Practices.Unity;
7
using Microsoft.VisualStudio.TestTools.UnitTesting;
5
using Microsoft.VisualStudio.TestTools.UnitTesting;
8
using Repository.NHibernateDataAccess;
6
using Repository.NHibernateDataAccess;
...
...
83
        [TestMethod]
81
        [TestMethod]
84
        public void GetEmployees()
82
        public void GetEmployees()
85
        {
83
        {
86
            IList<Employee> employees = _provider.GetEmployees();
84
            var employees = _provider.GetEmployees();
87
            Assert.IsNotNull(employees);
85
            Assert.IsNotNull(employees);
88
            Assert.IsTrue(employees.Count > 0);
86
            Assert.IsTrue(employees.Count > 0);
89
            Assert.IsTrue(employees[0].Id > 0);
87
            Assert.IsTrue(employees[0].Id > 0);
...
...
94
        public void GetEmployee()
92
        public void GetEmployee()
95
        {
93
        {
96
            const int id = 9;
94
            const int id = 9;
97
            Employee employee = _provider.GetEmployee(id);
95
            var employee = _provider.GetEmployee(id);
98
96
99
            Assert.IsNotNull(employee);
97
            Assert.IsNotNull(employee);
100
            //Assert.IsTrue(employee.Id.HasValue);
98
            //Assert.IsTrue(employee.Id.HasValue);
...
...
124
        [TestMethod]
122
        [TestMethod]
125
        public void GetTerritories()
123
        public void GetTerritories()
126
        {
124
        {
127
            IList<Territory> territories = _provider.GetTerritories();
125
            var territories = _provider.GetTerritories();
128
126
129
            Assert.IsTrue(territories.Count > 0);
127
            Assert.IsTrue(territories.Count > 0);
130
            Assert.IsFalse(string.IsNullOrEmpty(territories[0].Id));
128
            Assert.IsFalse(string.IsNullOrEmpty(territories[0].Id));

Updated UnityWeb/UnityWeb/Repository/Test/NHibernateRepositoryTest/NHibernateSessionManagerTest.cs Download diff

5556
1
#region Using Statements
1
#region Using Statements
2
2
3
using Microsoft.VisualStudio.TestTools.UnitTesting;
3
using Microsoft.VisualStudio.TestTools.UnitTesting;
4
using NHibernate;
5
using Repository.NHibernateDataAccess;
4
using Repository.NHibernateDataAccess;
6
5
7
#endregion
6
#endregion
...
...
17
    public class NHibernateSessionManagerTest
16
    public class NHibernateSessionManagerTest
18
    {
17
    {
19
        private static readonly NHibernateSessionManager target = new NHibernateSessionManager();
18
        private static readonly NHibernateSessionManager target = new NHibernateSessionManager();
20
        private TestContext testContextInstance;
21
19
22
        /// <summary>
20
        /// <summary>
23
        ///Gets or sets the test context which provides
21
        ///Gets or sets the test context which provides
24
        ///information about and functionality for the current test run.
22
        ///information about and functionality for the current test run.
25
        ///</summary>
23
        ///</summary>
26
        public TestContext TestContext
24
        public TestContext TestContext { get; set; }
27
        {
28
            get { return testContextInstance; }
29
            set { testContextInstance = value; }
30
        }
31
25
32
        #region Additional test attributes
26
        #region Additional test attributes
33
27
...
...
67
        [TestMethod]
61
        [TestMethod]
68
        public void NHibernateSessionManagerGetSessionTest()
62
        public void NHibernateSessionManagerGetSessionTest()
69
        {
63
        {
70
            ISession actual = target.GetSession();
64
            var actual = target.GetSession();
71
            Assert.IsNotNull(actual);
65
            Assert.IsNotNull(actual);
72
        }
66
        }
73
67

Updated UnityWeb/UnityWeb/Repository/Test/NHibernateRepositoryTest/ProductDataProviderTest.cs Download diff

5556
1
#region Using Statements
1
#region Using Statements
2
2
3
using System.Collections.Generic;
4
using Domain.Business;
5
using Microsoft.Practices.Unity;
3
using Microsoft.Practices.Unity;
6
using Microsoft.VisualStudio.TestTools.UnitTesting;
4
using Microsoft.VisualStudio.TestTools.UnitTesting;
7
using Repository.NHibernateDataAccess;
5
using Repository.NHibernateDataAccess;
...
...
82
        [TestMethod]
80
        [TestMethod]
83
        public void ProductDataProviderGetProducts()
81
        public void ProductDataProviderGetProducts()
84
        {
82
        {
85
            IList<Product> Products = _provider.GetProducts();
83
            var Products = _provider.GetProducts();
86
            Assert.IsNotNull(Products);
84
            Assert.IsNotNull(Products);
87
            Assert.IsTrue(Products.Count > 0);
85
            Assert.IsTrue(Products.Count > 0);
88
            Assert.IsTrue(Products[0].Id > 0);
86
            Assert.IsTrue(Products[0].Id > 0);
...
...
92
            Assert.IsTrue(Products[0].Category.Id > 0);
90
            Assert.IsTrue(Products[0].Category.Id > 0);
93
        }
91
        }
94
92
95
        //[TestMethod]
93
        [TestMethod]
96
        //public void ProductDataProviderGetProduct()
94
        public void ProductDataProviderGetProduct()
97
        //{
95
        {
98
        //    const int id = 9;
96
            const int id = 9;
99
        //    Product Product = _provider.GetProduct(id);
97
            var Product = _provider.GetProduct(id);
100
98
101
        //    Assert.IsNotNull(Product);
99
            Assert.IsNotNull(Product);
102
        //    //Assert.IsTrue(Product.Id.HasValue);
100
            Assert.IsTrue(Product.Id == id);
103
        //    Assert.IsTrue(Product.Id == id);
101
            Assert.IsNotNull(Product.Supplier);
104
        //    //  Assert.IsTrue(!string.IsNullOrEmpty(Product.Address.AddressLine1));
102
            Assert.IsTrue(Product.Supplier.Id > 0);
105
        //}
103
            Assert.IsNotNull(Product.Category);
104
            Assert.IsTrue(Product.Category.Id > 0);
105
        }
106
106
107
        //[TestMethod]
107
        //[TestMethod]
108
        //public void ProductDataProviderAddProduct()
108
        //public void ProductDataProviderAddProduct()

Updated UnityWeb/UnityWeb/UnityWeb/Config/ConnectionString.config Download diff

5556
1
<connectionStrings>
1
<connectionStrings>
2
  <add name="AdventureWorksConnection" connectionString="Integrated Security=SSPI;Persist Security Info=False;Data Source=LocalServer;Initial Catalog=Northwind" providerName="System.Data.SqlClient"/>
2
  <add name="NorthwindConnection" connectionString="Integrated Security=SSPI;Persist Security Info=False;Data Source=LocalServer;Initial Catalog=Northwind" providerName="System.Data.SqlClient"/>
3
</connectionStrings>
3
</connectionStrings>