static StylesMockRepository() { IMockUnitOfWork muw = new MockUnitOfWork(); IEntityRepository <MockRule> ruleStore = muw.Repository <MockRule>(); List <RuleDTO> rules = StylesDataInitializer.GetRules(); foreach (var item in rules) { ruleStore.Insert(new MockRule { Selector = item.Selector, Name = item.Name, Category = item.Category, Scope = item.Scope, DefaultStyle = new MockStyle() { Color = item.Style.Color, BackgroundColor = item.Style.BackgroundColor, BackgroundImage = item.Style.BackgroundImage } }); } muw.SaveChanges(); }