Esempio n. 1
0
File: View.cs Progetto: mind0n/hive
		public void AddCategory(Category c)
		{
			if (!Categories.Contains(c))
			{
				Categories.Add(c);
			}
		}
Esempio n. 2
0
        public void Can_Get_Cat()
        {
            EFUnitOfWork ef = new EFUnitOfWork();

            var sample = new Category() { Name = "yura skaki" };

            ef.Categories.Create(sample);

            Assert.NotNull(ef.Categories.GetAll());
        }
        public void UpdateCategoryPicture(Category category)
        {
            if (category == null)
            {
                return;
            }

            using (var connection = this.GetConnection())
            {
                var categoryQueryObject = new CategoryQueryObject();
                connection.Execute(categoryQueryObject.UpdateCategoryImage(category.CategoryID, category.Picture));
            }
        }
Esempio n. 4
0
File: View.cs Progetto: mind0n/hive
		public void Initialize(Category c = null)
		{
			Categories.Clear();
			if (c == null)
			{
				foreach (CategoryViewMapping i in Db.Instance.CVMappings.Mappings)
				{
					if (Guid.Equals(i.ViewId.Value, this.Id))
					{
						AddCategory(i.Category);
					}
				}
			}
			else
			{
				AddCategory(c);
			}
		}