public List <Interaction> GetAllInteractionsByColonia(int coloniaId) { List <Interaction> ret = new List <Interaction>(); ctx.Interaction.Where(c => c.requesterId == coloniaId).OrderByDescending(c => c.Fecha).ToList().ForEach((data) => { ret.Add(InteractionHandler.DataToShared(data)); }); return(ret); }
public List <Interaction> GetAllInteractions() { List <Interaction> ret = new List <Interaction>(); ctx.Interaction.ToList().ForEach((data) => { ret.Add(InteractionHandler.DataToShared(data)); }); return(ret); }
public Interaction GetInteraction(int id) { DALayer.Entities.Interaction data = ctx.Interaction.Where(c => c.Id == id).First(); if (data != null) { return(InteractionHandler.DataToShared(data)); } else { return(null); } }