public Status Add(Status status)
 {
     const string sqlQuery = "INSERT INTO Status (Name) " +
                             "VALUES (@Name)";
     var statusId = _dbConnection.QueryWithRetry<int>(sqlQuery, status).Single();
     status.Id = statusId;
     return status;
 }
 public Status Update(Status status)
 {
     const string sqlQuery = "UPDATE Status SET " +
                             "Name = @Name " +
                             "WHERE Id = @Id";
     _dbConnection.QueryWithRetry<Status>(sqlQuery, status);
     return status;
 }
Beispiel #3
0
        private Status LlenarStatus(ClassLibrary1.Status statusDeLaBase)
        {
            var status = new Status();

            status.Id         = statusDeLaBase.ID;
            status.StatusName = statusDeLaBase.Status1;
            status.StatusEnum = (Status.StatusType)statusDeLaBase.ID;

            return(status);
        }