public JerseyBuilder CreateNewJersey(Guid uniformStyleId) { UniformStyleRepository repos = Factory.GetUniformStyleRepository(DataContext); var style = repos.Find(uniformStyleId); return(Factory.CreateNewJersey(style)); }
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()); }
public IList <Domain.UniformStyle> GetAllUniformStyles() { var repo = new UniformStyleRepository(DataContext); return(repo.All()); }