Created
December 30, 2018 17:09
-
-
Save azaharafernandezguizan/f7b78e745d99c4b1b227e4b97f730b44 to your computer and use it in GitHub Desktop.
Example of manager implementation on NetCore
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Text; | |
using MyBusinessLogic; | |
using MyDBContext.Models; | |
using MyDTOs; | |
namespace MyManager | |
{ | |
public class InfoManager : IInfoManager | |
{ | |
private IRecursosRepository recursosRepository = new RecursosRepository(new myContext()); | |
public List<RecursosInfo> getRecursos() | |
{ | |
List<Recursos> objectList = recursosRepository.GetAllRecursos(); | |
return objectList.Select(x => new RecursosInfo | |
{ | |
RecursoID = x.Id, | |
Nombre = x.Titulo, | |
Descripcion = x.Descripcion, | |
Categoria = x.Categoria | |
}).ToList(); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment