Ejemplo n.º 1
0
        public void Update(EmployeeDataModel dataModel)
        {
            var query = @"spUpdateEmployees 
            @Id,
            @FirstName,
            @LastName,
            @ComplexDetails,
            @StreetName,
            @Suburb,
            @Province,
            @Country,
            @PostalCode,
            @ContactCountryCode,
            @ContactNumber,
            @ContactExtension,
            @EmailAddress,
            @TwitterHandle,
            @GithubPage";

            _dbConnection.Execute(query, dataModel);
        }
Ejemplo n.º 2
0
        public int Add(EmployeeDataModel dataModel)
        {
            var query = @"spAddEmployees
            @FirstName,
            @LastName,
            @ComplexDetails,
            @StreetName,
            @Suburb,
            @Province,
            @Country,
            @PostalCode,
            @ContactCountryCode,
            @ContactNumber,
            @ContactExtension,
            @EmailAddress,
            @TwitterHandle,
            @GithubPage";

            var result = _dbConnection.Query <int>(query, dataModel);

            return(result.FirstOrDefault());
        }