Exemple #1
0
        public JerseyBuilder CreateNewJersey(Guid uniformStyleId)
        {
            UniformStyleRepository repos = Factory.GetUniformStyleRepository(DataContext);
            var style = repos.Find(uniformStyleId);

            return(Factory.CreateNewJersey(style));
        }
Exemple #2
0
        public IList <JerseyView> GetAllJerseysForStyleId(Guid styleId)
        {
            UniformStyleRepository repos = Factory.GetUniformStyleRepository(DataContext);
            var style = repos.Find(styleId);

            var repo = Factory.GetUniformRepository(DataContext);

            return(repo.Query().Where(jersey => jersey.UniformStyleId == styleId)
                   .Select(jersey => new JerseyView
            {
                Id = jersey.Id,
                Name = jersey.Name,
                Description = jersey.Description,
                Identifier = jersey.Identifier,
                StyleName = style.Name,
                StyleId = style.Id
            }).ToList());
        }
Exemple #3
0
        public IList <Domain.UniformStyle> GetAllUniformStyles()
        {
            var repo = new UniformStyleRepository(DataContext);

            return(repo.All());
        }