public static IEnumerable <ActionMap> GetActionsMapsFromTargetObject(object target, bool onlyWithAttribute = false, bool usePrefixInAllMethods = false, string prefix = null) { var argumentMapper = new ArgumentMapper(); var actionMapper = new ActionMapper(argumentMapper); return(actionMapper.Map(target, onlyWithAttribute, usePrefixInAllMethods, prefix)); }
public void Add(ActionBusiness action) { var entity = ActionMapper.Map(action); databaseContext.Action.Add(entity); databaseContext.SaveChanges(); }
public void Update(ActionBusiness action) { var entity = databaseContext.Action.Find(action.Id); if (entity != null) { entity = ActionMapper.Map(action); databaseContext.SaveChanges(); } }
public ActionBusiness GetById(int id) { return((from s in databaseContext.Action where s.Id == id select ActionMapper.Map(s)).FirstOrDefault()); }
public List <ActionBusiness> GetAll() { return((from a in databaseContext.Action.Include(i => i.Person) select ActionMapper.Map(a)).ToList()); }