Пример #1
0
        public FormAction GetByFormName(string formName)
        {
            FormAction obj = null;

            string sql = _sqlTemplate.Replace("{WHERE}", "WHERE form_name = @formName")
                         .Replace("{ORDER}", "");

            obj = _context.Conn.Query <FormAction>(sql, new { formName = formName }).FirstOrDefault();

            return(obj);
        }
Пример #2
0
        public int Save(FormAction obj)
        {
            var result = 0;

            try
            {
                _context.Conn.Insert(obj);
                result = 1;
            }
            catch (Exception ex)
            {
                throw new Exception(ex.Message);
            }

            return(result);
        }
Пример #3
0
 public int Delete(FormAction obj)
 {
     throw new NotImplementedException();
 }