public async Task <int> Add(DistributionEmployee employee) { var cmd = QueriesCreatingHelper.CreateQueryInsert(employee); cmd += ";SELECT LAST_INSERT_ID();"; return((await DALHelper.ExecuteQuery <int>(cmd, dbTransaction: DbTransaction, connection: DbConnection)).First()); }
public async Task <int> Update(DistributionEmployee employee) { var cmd = QueriesCreatingHelper.CreateQueryUpdate(employee); var rs = await DALHelper.Execute(cmd, dbTransaction : DbTransaction, connection : DbConnection); return(rs == 0 ? -1 : 0); }
public UpdateCommand(DistributionEmployee employee) { Employee = employee; }
public AddCommand(DistributionEmployee employee) { Employee = employee; }