Beispiel #1
0
        public void Update(StaffMasterModel obj)
        {
            var sql = @"
UPDATE staff_master 
SET 
first_name=@FirstName, surname=@Surname, email=@Email, insert_date=@InsertDate, salary=@Salary
WHERE id = @id";

            Update <StaffMasterModel>(sql, obj);
        }
Beispiel #2
0
        public int Insert(StaffMasterModel obj)
        {
            var sql = @"
INSERT INTO staff_master 
(first_name, surname, email, insert_date, salary)
VALUES
(@FirstName, @Surname, @Email, @InsertDate, @Salary);
SELECT SCOPE_IDENTITY();";

            return(Insert <StaffMasterModel>(sql, obj));
        }
Beispiel #3
0
        public int Insert(StaffMasterModel obj)
        {
            var sql = @"
INSERT INTO test.staff_master 
(first_name, surname, email, insert_date, salary)
VALUES
(@FirstName, @Surname, @Email, @InsertDate, @Salary);
RETURNING id();";

            return(Insert <StaffMasterModel>(sql, obj));
        }