//переделать public void Update(Empl empl) { using (IDbConnection db = new SqlConnection(connectionString)) { var sqlQuery = "UPDATE Empl SET FirstName = @FirstName, LastName = @LastName, Title = @Title, BirthDate = @BirthDate, City = @City WHERE Id = @Id"; db.Execute(sqlQuery, empl); } }
//переделать public void Create(Empl user) { using (IDbConnection db = new SqlConnection(connectionString)) { var sqlQuery = "INSERT INTO [dbo].[Empl] (FirstName ,LastName ,Title ,BirthDate ,City) VALUES (@FirstName, @LastName, @Title, @BirthDate, @City)"; db.Execute(sqlQuery, user); } }