public SqlOperation GetUpdateStatement(BaseEntity entity) { var operation = new SqlOperation { ProcedureName = "UPD_LOCATION_PR" }; var location = (Location)entity; operation.AddIntParam(DB_COL_ID, location.Id); operation.AddVarcharParam(DB_COL_NAME, location.Name); operation.AddFloatParam(DB_COL_LATITUDE, location.Latitude); operation.AddFloatParam(DB_COL_LONGITUDE, location.Longitude); return(operation); }
public SqlOperation GetCreateStatement(BaseEntity entity) { var operation = new SqlOperation { ProcedureName = "CRE_LOCATION_PR" }; var c = (Location)entity; operation.AddVarcharParam(DB_COL_NAME, c.Name); operation.AddFloatParam(DB_COL_LATITUDE, c.Latitude); operation.AddFloatParam(DB_COL_LONGITUDE, c.Longitude); return(operation); }
public SqlOperation GetCreateStatement(BaseEntity entity) { var operation = new SqlOperation { ProcedureName = "CREATE_CASO_PR" }; var c = (CasoDeUso)entity; operation.AddStringParam(DB_COL_CODIGO, c.CODIGO); operation.AddIntParam(DB_COL_ID_PROYECTO, c.ID_PROYECTO); operation.AddFloatParam(DB_COL_PRIORIDAD, c.PRIORIDAD); operation.AddStringParam(DB_COL_NOMBRE, c.NOMBRE); operation.AddStringParam(DB_COL_DESCRIPCION, c.DESCRIPCION); return(operation); }