The relationship between biodiversity and ecosystem functioning has been extensively studied over the last three decades using experiments, theoretical models, and more recently observational data. While most studies focus on species richness effects on ecosystem functioning, a large degree of variation remain unexplained, highlighting that other factors besides species richness are needed to fully understand and predict differences and changes in ecosystem functioning. In this study, we use a trait-based food web model to investigate the role of food web structure on multiple ecosystem functions (e.g. biomass, production, productivity, and metabolism). We demonstrate that the relationship with species richness depends on the type of ecosystem function considered. Furthermore, we show that the level of ecosystem functions is determined by particular food web configurations, as well as the degree of species dominance. Dominance plays a major role in determining the level of biomass in the food web, occurring via species interactions and occupancy of the trait space. By manipulating the structure of the food web, we show that species using a wider niche space (generalist communities) result in more connected food webs compared to species with a narrow niches (specialist communities), and generally reach the same level of functioning with a fewer number of species. We show that a trait-based approach can help understanding ecosystem structure and functioning of marine food webs, and help building research hypothesis for field-based studies.