Ejemplo n.º 1
0
        public bool Update(PartyModel party)
        {
            int result = -1;

            Party p = ModelHelpers.FromModel(party);

            using (var connection = GetConnection())
            {
                result = connection.Update(p);
            }

            return(result > 0);
        }
Ejemplo n.º 2
0
        public bool Add(PartyModel party)
        {
            int result = -1;

            Party p = ModelHelpers.FromModel(party);

            using (var connection = GetConnection())
            {
                result = connection.Insert(p);
            }

            // HACK:  this isn't right, but I need to move on
            party.PartyId = p.ID;

            // result is count of inserts
            return(result > 0);
        }