Ejemplo n.º 1
0
        public int Insert(AccountBook instance)
        {
            const string sqlStatement = "Insert Into accountbook(Id,Categoryyy,Amounttt,Dateee,Remarkkk)Values(@Id,@Categoryyy,@Amounttt,@Dateee,@Remarkkk)";

            using (var conn = new SqlConnection(this.ConnectionString))
            {
                try
                {
                    return(conn.Execute(sqlStatement, new
                    {
                        Id = Guid.NewGuid(),
                        Categoryyy = instance.Categoryyy,
                        Amounttt = instance.Amounttt,
                        Dateee = instance.Dateee,
                        Remarkkk = instance.Remarkkk
                    }));
                }
                catch (Exception)
                {
                    throw;
                }
            }
        }
Ejemplo n.º 2
0
 public void SaveChanges(AccountBook accountbook)
 {
     int a = _dao.Insert(accountbook);
 }