public List <FileDependencyModel> ReadLike(FileDependencyModel modelo) { var bd = new BDConnection.BDConnection(); var lista = new List <FileDependencyModel>(); var config = new MapperConfiguration(cfg => cfg.CreateMap <FileDependencyModel, FileDependencyModel>()); IMapper iMapper = config.CreateMapper(); try { foreach (var item in bd.ReadLike <FileDependencyModel>(modelo)) { lista.Add(iMapper.Map <object, FileDependencyModel>(item)); } } catch (Exception e) { return(null); } return(lista); }
public bool Edit(FileDependencyModel modelo, long id) { var bd = new BDConnection.BDConnection(); modelo.FileDependencyId = id; return(bd.Edit <FileDependencyModel>(modelo, id.ToString())); }
public FileDependencyModel Read(FileDependencyModel modelo) { var bd = new BDConnection.BDConnection(); var config = new MapperConfiguration(cfg => cfg.CreateMap <FileDependencyModel, FileDependencyModel>()); IMapper iMapper = config.CreateMapper(); var f = iMapper.Map <object, FileDependencyModel>(bd.ReadWhere <FileDependencyModel>(modelo)); return(f); }
public bool Add(FileDependencyModel modelo) { var bd = new BDConnection.BDConnection(); var res = bd.Add <FileDependencyModel>(modelo); return(res); }
public bool Delete(long id) { var bd = new BDConnection.BDConnection(); var modelo = new FileDependencyModel(); modelo.FileDependencyId = id; var g = bd.DeletePost <FileDependencyModel>(modelo, id); return(g); }