public Category Map(entityframework.Models.Category toMap)
 {
     return(new Category
     {
         Name = toMap.Name
     });
 }
        public Category Create(Category toCreate)
        {
            var dataModel = new entityframework.Models.Category
            {
                Id   = Guid.NewGuid().ToString(),
                Name = toCreate.Name
            };

            _dbContext.Categories.Add(dataModel);
            _dbContext.SaveChanges();

            return(toCreate);
        }
        public static void WithCategory(this TestCompositionRoot root,
                                        string name)
        {
            var context  = root.Get <RecipeBookDbContext>();
            var category = new entityframework.Models.Category
            {
                Id   = Guid.NewGuid().ToString(),
                Name = name
            };

            context.Categories.Add(category);
            context.SaveChanges();
        }