Esempio n. 1
0
        public Category MapFromDatabase(DatabaseModel.Category databaseCategory)
        {
            if (databaseCategory == null)
            {
                return(null);
            }

            var domainCategory = new Category();

            domainCategory.Id   = databaseCategory.Id;
            domainCategory.Name = databaseCategory.Name;

            return(domainCategory);
        }
Esempio n. 2
0
        public DatabaseModel.Category MapToDatabase(Category domainCategory)
        {
            if (domainCategory == null)
            {
                return(null);
            }

            var databaseCategory = new DatabaseModel.Category();

            databaseCategory.Id   = domainCategory.Id;
            databaseCategory.Name = domainCategory.Name;

            return(databaseCategory);
        }